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

Michael Niedermayer git at videolan.org
Sun Apr 27 05:45:46 CEST 2014


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

avcodec/mjpegdec: Fix undefined shift

Fixes CID1194388

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

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index f2f5498..df1ce1e 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1272,7 +1272,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