From 0ccabeeaef77e240f2a44f78271a8914a23e239b Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Mon, 27 Dec 2010 15:10:21 +0000 Subject: Support filters and decoders that dont support negative linesizes. This patch is based on work by stefano. Originally committed as revision 26108 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavfilter/vf_vflip.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'libavfilter/vf_vflip.c') diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c index 2ff44411b3..e5cede81b5 100644 --- a/libavfilter/vf_vflip.c +++ b/libavfilter/vf_vflip.c @@ -43,11 +43,13 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms, int w, int h) { FlipContext *flip = link->dst->priv; + AVFilterBufferRef *picref; int i; - AVFilterBufferRef *picref = avfilter_get_video_buffer(link->dst->outputs[0], - perms, w, h); + if (!(perms & AV_PERM_NEG_LINESIZES)) + return avfilter_default_get_video_buffer(link, perms, w, h); + picref = avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); for (i = 0; i < 4; i ++) { int vsub = i == 1 || i == 2 ? flip->vsub : 0; -- cgit v1.2.3