mjpegdec: reset restart_count on progressive scans
authorMichael Niedermayer <michaelni@gmx.at>
Thu, 27 Dec 2012 16:39:10 +0000 (17:39 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 27 Dec 2012 16:41:53 +0000 (17:41 +0100)
Fixes Ticket2068

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

index 71edc91..c1712ea 100644 (file)
@@ -1134,6 +1134,8 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
     if (s->interlaced && s->bottom_field)
         data += linesize >> 1;
 
+    s->restart_count = 0;
+
     for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
         uint8_t *ptr     = data + (mb_y * linesize * 8 >> s->avctx->lowres);
         int block_idx    = mb_y * s->block_stride[c];