mjpegdec: allow 2 components in ljpeg_decode_yuv_scan()

Fixes assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-01-08 02:30:02 +01:00
parent b23aff6755
commit 4c80184cf5

View File

@ -852,7 +852,7 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor,
point_transform += bits - s->bits;
av_assert0(nb_components==1 || nb_components==3);
av_assert0(nb_components>=1 && nb_components<=3);
for (mb_y = 0; mb_y < s->mb_height; mb_y++) {
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {