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

Michael Niedermayer git at videolan.org
Mon Jun 23 17:55:58 CEST 2014


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Apr 27 05:32:56 2014 +0200| [aaf6ddfa4d9da139b33dc8d3fa2cb30c92fd8c9e] | committer: Michael Niedermayer

avcodec/mjpegdec: Fix undefined shift

Fixes CID1194388

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b4329605289e25bb071ec1c1182bf25fc83b09aa)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=aaf6ddfa4d9da139b33dc8d3fa2cb30c92fd8c9e
---

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index ad00323..ddf6467 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1229,7 +1229,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
     }
 
     if (!Al) {
-        s->coefs_finished[c] |= (1LL << (se + 1)) - (1LL << ss);
+        s->coefs_finished[c] |= (2LL << se) - (1LL << ss);
         last_scan = !~s->coefs_finished[c];
     }
 



More information about the ffmpeg-cvslog mailing list