Commit 5ff8ca1f authored by Michael Niedermayer's avatar Michael Niedermayer

mjpegdec: Handle RSTn in progressive jpegs

Fixes Ticket2003
Reviewed-by: 's avatarAlexander Strasser <eclipse7@gmx.net>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 47e7f57a
...@@ -1141,6 +1141,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, ...@@ -1141,6 +1141,9 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
uint8_t *last_nnz = &s->last_nnz[c][block_idx]; uint8_t *last_nnz = &s->last_nnz[c][block_idx];
for (mb_x = 0; mb_x < s->mb_width; mb_x++, block++, last_nnz++) { for (mb_x = 0; mb_x < s->mb_width; mb_x++, block++, last_nnz++) {
int ret; int ret;
if (s->restart_interval && !s->restart_count)
s->restart_count = s->restart_interval;
if (Ah) if (Ah)
ret = decode_block_refinement(s, *block, last_nnz, s->ac_index[0], ret = decode_block_refinement(s, *block, last_nnz, s->ac_index[0],
quant_matrix, ss, se, Al, &EOBRUN); quant_matrix, ss, se, Al, &EOBRUN);
...@@ -1157,6 +1160,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, ...@@ -1157,6 +1160,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss,
s->dsp.idct_put(ptr, linesize, *block); s->dsp.idct_put(ptr, linesize, *block);
ptr += 8 >> s->avctx->lowres; ptr += 8 >> s->avctx->lowres;
} }
handle_rstn(s, 0);
} }
} }
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment