aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-06-20 20:14:01 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-06-20 20:14:01 +0200
commite632a430fe03dace7380c11e2bd62ea418e63abc (patch)
tree404f043b4bcf375ba61b20183f114b5aad7e15b3 /libavfilter
parenta46f8915bed9959827692fa198b36ed9dd254cfa (diff)
downloadffmpeg-e632a430fe03dace7380c11e2bd62ea418e63abc.tar.gz
vf_vflip: fix handling of the last line.
Fixes Ticket1271 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/vf_vflip.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavfilter/vf_vflip.c b/libavfilter/vf_vflip.c
index 6fd5d863a3..11129b26d7 100644
--- a/libavfilter/vf_vflip.c
+++ b/libavfilter/vf_vflip.c
@@ -56,7 +56,7 @@ static AVFilterBufferRef *get_video_buffer(AVFilterLink *link, int perms,
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
if (picref->data[i]) {
- picref->data[i] += ((h >> vsub)-1) * picref->linesize[i];
+ picref->data[i] += (((h + (1<<vsub)-1) >> vsub)-1) * picref->linesize[i];
picref->linesize[i] = -picref->linesize[i];
}
}
@@ -74,7 +74,7 @@ static void start_frame(AVFilterLink *link, AVFilterBufferRef *inpicref)
int vsub = i == 1 || i == 2 ? flip->vsub : 0;
if (outpicref->data[i]) {
- outpicref->data[i] += ((link->h >> vsub)-1) * outpicref->linesize[i];
+ outpicref->data[i] += (((link->h + (1<<vsub)-1)>> vsub)-1) * outpicref->linesize[i];
outpicref->linesize[i] = -outpicref->linesize[i];
}
}