[FFmpeg-cvslog] avcodec/mjpegdec: Fix negative shift
Michael Niedermayer
git at videolan.org
Fri Jan 15 16:37:57 CET 2016
ffmpeg | branch: release/2.7 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 10 15:52:09 2016 +0100| [7cfea0d41cb05f099c2456f7b0797382adda7756] | 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=7cfea0d41cb05f099c2456f7b0797382adda7756
---
libavcodec/mjpegdec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index c28f07d..2e0a568 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -994,7 +994,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