mjpeg_decode_scan: reset restart state
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 9 Jul 2013 21:43:36 +0000 (23:43 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 9 Jul 2013 21:43:36 +0000 (23:43 +0200)
Fixes Ticket2082
Fixes progressive/refinement + restart jpegs

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

index 7321b7f..ab4a633 100644 (file)
@@ -1029,7 +1029,7 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah,
         av_log(s->avctx, AV_LOG_ERROR, "Can not flip image with lowres\n");
         s->flipped = 0;
     }
-
+    s->restart_count = 0;
     for (i = 0; i < nb_components; i++) {
         int c   = s->comp_index[i];
         data[c] = s->picture_ptr->data[c];