summaryrefslogtreecommitdiff
path: root/libavfilter/vf_vflip.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2012-11-28 08:41:07 +0100
committerAnton Khirnov <anton@khirnov.net>2013-03-08 07:37:18 +0100
commit7e350379f87e7f74420b4813170fe808e2313911 (patch)
tree031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/vf_vflip.c
parent77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff)
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it and use AVFrame instead.
Diffstat (limited to 'libavfilter/vf_vflip.c')
-rw-r--r--libavfilter/vf_vflip.c22
1 files changed, 9 insertions, 13 deletions
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;