[FFmpeg-cvslog] fade: fix draw_slice() check on fade->factor value
Mark Himsley
git at videolan.org
Wed Apr 27 00:54:00 CEST 2011
ffmpeg | branch: oldabi | Mark Himsley <mark at mdsh.com> | Fri Mar 18 15:25:26 2011 +0000| [b04d1abb40d32d8d08df39733e1b04a8a2f814ab] | committer: Anton Khirnov
fade: fix draw_slice() check on fade->factor value
draw_slice() checks that the fade factor is < 65536 and only
calculates the fade if so. But the fade factor is clipped in
end_frame() by av_clip_uint16() to 65535, so the fade is calculated
for every frame. This patch alters the check so that it compares with
< 65535 (UINT16_MAX).
Signed-off-by: Anton Khirnov <anton at khirnov.net>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b04d1abb40d32d8d08df39733e1b04a8a2f814ab
---
libavfilter/vf_fade.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavfilter/vf_fade.c b/libavfilter/vf_fade.c
index 4c2cd4b..0c8668c 100644
--- a/libavfilter/vf_fade.c
+++ b/libavfilter/vf_fade.c
@@ -101,7 +101,7 @@ static void draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir)
uint8_t *p;
int i, j, plane;
- if (fade->factor < 65536) {
+ if (fade->factor < UINT16_MAX) {
/* luma or rgb plane */
for (i = 0; i < h; i++) {
p = outpic->data[0] + (y+i) * outpic->linesize[0];
More information about the ffmpeg-cvslog
mailing list