diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-28 08:41:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 07:37:18 +0100 |
commit | 7e350379f87e7f74420b4813170fe808e2313911 (patch) | |
tree | 031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/vsrc_color.c | |
parent | 77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff) |
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
Diffstat (limited to 'libavfilter/vsrc_color.c')
-rw-r--r-- | libavfilter/vsrc_color.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/libavfilter/vsrc_color.c b/libavfilter/vsrc_color.c index c0a4e1c3b2..9d9aab3f2a 100644 --- a/libavfilter/vsrc_color.c +++ b/libavfilter/vsrc_color.c @@ -146,19 +146,18 @@ static int color_config_props(AVFilterLink *inlink) static int color_request_frame(AVFilterLink *link) { ColorContext *color = link->src->priv; - AVFilterBufferRef *picref = ff_get_video_buffer(link, AV_PERM_WRITE, color->w, color->h); + AVFrame *frame = ff_get_video_buffer(link, color->w, color->h); - if (!picref) + if (!frame) return AVERROR(ENOMEM); - picref->video->pixel_aspect = (AVRational) {1, 1}; - picref->pts = color->pts++; - picref->pos = -1; + frame->sample_aspect_ratio = (AVRational) {1, 1}; + frame->pts = color->pts++; - ff_draw_rectangle(picref->data, picref->linesize, + ff_draw_rectangle(frame->data, frame->linesize, color->line, color->line_step, color->hsub, color->vsub, 0, 0, color->w, color->h); - return ff_filter_frame(link, picref); + return ff_filter_frame(link, frame); } static const AVFilterPad avfilter_vsrc_color_outputs[] = { |