From 7e350379f87e7f74420b4813170fe808e2313911 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Wed, 28 Nov 2012 08:41:07 +0100 Subject: lavfi: switch to AVFrame. Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead. --- libavfilter/vf_vflip.c | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'libavfilter/vf_vflip.c') diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c index 5e6e9653bd..589a05916c 100644 --- a/libavfilter/vf_vflip.c +++ b/libavfilter/vf_vflip.c @@ -43,33 +43,29 @@ static int config_input(AVFilterLink *link) return 0; } -static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, - int w, int h) +static AVFrame *get_video_buffer(AVFilterLink *link, int w, int h) { FlipContext *flip = link->dst->priv; - AVFilterBufferRef *picref; + AVFrame *frame; int i; - if (!(perms & AV_PERM_NEG_LINESIZES)) - return ff_default_get_video_buffer(link, perms, w, h); - - picref = ff_get_video_buffer(link->dst->outputs[0], perms, w, h); - if (!picref) + frame = ff_get_video_buffer(link->dst->outputs[0], w, h); + if (!frame) return NULL; for (i = 0; i < 4; i ++) { int vsub = i == 1 || i == 2 ? flip->vsub : 0; - if (picref->data[i]) { - picref->data[i] += ((h >> vsub)-1) * picref->linesize[i]; - picref->linesize[i] = -picref->linesize[i]; + if (frame->data[i]) { + frame->data[i] += ((h >> vsub) - 1) * frame->linesize[i]; + frame->linesize[i] = -frame->linesize[i]; } } - return picref; + return frame; } -static int filter_frame(AVFilterLink *link, AVFilterBufferRef *frame) +static int filter_frame(AVFilterLink *link, AVFrame *frame) { FlipContext *flip = link->dst->priv; int i; -- cgit v1.2.3