diff options
author | Luca Barbato <lu_zero@gentoo.org> | 2013-05-14 16:20:14 +0200 |
---|---|---|
committer | Luca Barbato <lu_zero@gentoo.org> | 2013-05-20 22:02:05 +0200 |
commit | a030279a67ef883df8cf3707774656fa1be81078 (patch) | |
tree | 3eb5d65636bc00d731219ff656013e66e5ebf024 /libavcodec/mjpegdec.c | |
parent | 8aa3500905fec6c4e657bb291b861d43c34d3de9 (diff) | |
download | ffmpeg-a030279a67ef883df8cf3707774656fa1be81078.tar.gz |
ljpeg: use the correct number of components in yuv
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: libav-stable@libav.org
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 83b40d90c3..896fa996f0 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -711,10 +711,9 @@ static int ljpeg_decode_rgb_scan(MJpegDecodeContext *s, int predictor, } static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, - int point_transform) + int point_transform, int nb_components) { int i, mb_x, mb_y; - const int 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++) { @@ -1098,7 +1097,8 @@ next_field: return ret; } else { if ((ret = ljpeg_decode_yuv_scan(s, predictor, - point_transform)) < 0) + point_transform, + nb_components)) < 0) return ret; } } |