diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 17:02:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-03 22:51:28 +0100 |
commit | e8c8b27f6670761f57e990e94629b540c1e178c2 (patch) | |
tree | 341b048a00c7778e743daf8024eda4f5adcf9fed /libavcodec/mjpegdec.c | |
parent | 4eff392a4bafb11e1c38907a1f24b154c4bf312a (diff) | |
download | ffmpeg-e8c8b27f6670761f57e990e94629b540c1e178c2.tar.gz |
jpegdec: Only enable rgb mode when there are 3 components.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 24964f21e4976edab156dc934c3b5ec3746b16eb)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r-- | libavcodec/mjpegdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 5a6133f313..b9b8a7dead 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -282,7 +282,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s) return -1; } - if(s->v_max==1 && s->h_max==1 && s->lossless==1) s->rgb=1; + if(s->v_max==1 && s->h_max==1 && s->lossless==1 && nb_components==3) s->rgb=1; /* if different size, realloc/alloc picture */ /* XXX: also check h_count and v_count */ |