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, 10 Jun 2015 00:13:11 +0000 (02:13 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 81cf9108563510dee24f73b2c5d94a7bd07ff747)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index 91b4d79..946d7be 100644 (file)
@@ -150,7 +150,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;
 }