[FFmpeg-cvslog] avcodec/mjpegdec: Fix negative shift

Michael Niedermayer git at videolan.org
Mon Feb 1 02:35:18 CET 2016


ffmpeg | branch: release/2.4 | Michael Niedermayer <michael at niedermayer.cc> | Sun Jan 10 15:52:09 2016 +0100| [5c0d8a8387772bc9309e75a8974105031359330d] | 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=5c0d8a8387772bc9309e75a8974105031359330d
---

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index f6f1fae..8e3a98a 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -950,7 +950,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