mjpegdec: reset restart_count on progressive scans

Fixes Ticket2068

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-12-27 17:39:10 +01:00
parent ae2b51acd2
commit b61097fe0d
1 changed files with 2 additions and 0 deletions

View 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];