avcodec/mjpegdec: fix len computation in ff_mjpeg_decode_dqt()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 13 May 2015 16:36:19 +0000 (18:36 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 13 May 2015 16:36:50 +0000 (18:36 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index b3dc246..1ce3328 100644 (file)
@@ -189,7 +189,7 @@ int ff_mjpeg_decode_dqt(MJpegDecodeContext *s)
                                  s->quant_matrixes[index][s->scantable.permutated[8]]) >> 1;
         av_log(s->avctx, AV_LOG_DEBUG, "qscale[%d]: %d\n",
                index, s->qscale[index]);
-        len -= 65;
+        len -= 1 + 64 * (1+pr);
     }
     return 0;
 }