diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-12-25 03:54:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-12-26 20:43:20 +0100 |
commit | 5ff8ca1f04e75ad6c1934f3818c01d1e9bda8456 (patch) | |
tree | 81d7163e86f1ffeb0963148a46a329b5425b59b0 /libavcodec/mjpegdec.c | |
parent | 47e7f57a4b142f02e6521ce2aec74ddee435fc3c (diff) | |
download | ffmpeg-streaming-5ff8ca1f04e75ad6c1934f3818c01d1e9bda8456.zip ffmpeg-streaming-5ff8ca1f04e75ad6c1934f3818c01d1e9bda8456.tar.gz |
mjpegdec: Handle RSTn in progressive jpegs
Fixes Ticket2003
Reviewed-by: Alexander Strasser <eclipse7@gmx.net>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index cf7dd8c..2ad1e2d 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -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]; for (mb_x = 0; mb_x < s->mb_width; mb_x++, block++, last_nnz++) { int ret; + if (s->restart_interval && !s->restart_count) + s->restart_count = s->restart_interval; + if (Ah) ret = decode_block_refinement(s, *block, last_nnz, s->ac_index[0], quant_matrix, ss, se, Al, &EOBRUN); @@ -1157,6 +1160,7 @@ static int mjpeg_decode_scan_progressive_ac(MJpegDecodeContext *s, int ss, s->dsp.idct_put(ptr, linesize, *block); ptr += 8 >> s->avctx->lowres; } + handle_rstn(s, 0); } } return 0; |