[FFmpeg-cvslog] avcodec/mjpegdec: Fix negative shift
Michael Niedermayer
git at videolan.org
Fri Jan 15 17:51:13 CET 2016
ffmpeg | branch: release/2.5 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 10 15:52:09 2016 +0100| [e2285e7cc83f0429acabd09d6fc94a84d1763265] | committer: Michael Niedermayer
avcodec/mjpegdec: Fix negative shift
Fixes: mjpeg_left_shift.avi
Found-by: Piotr Bandurski <ami_stuff at o2.pl>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit d86d7b2486cd5c31db8e820d8a89554abf19567e)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e2285e7cc83f0429acabd09d6fc94a84d1763265
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 67db2bb..439365f 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -975,7 +975,7 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int nb_components, int p
return -1;
left[i] = buffer[mb_x][i] =
- mask & (pred + (dc << point_transform));
+ mask & (pred + (dc * (1 << point_transform)));
}
if (s->restart_interval && !--s->restart_count) {
More information about the ffmpeg-cvslog
mailing list