diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 17:02:41 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-02 17:53:40 +0100 |
commit | 24964f21e4976edab156dc934c3b5ec3746b16eb (patch) | |
tree | e1903a4c41c01693766acd9db2df1c8180f1e515 | |
parent | 0af34c4d2c49157d118aea48a834c51555e777ff (diff) | |
download | ffmpeg-24964f21e4976edab156dc934c3b5ec3746b16eb.tar.gz |
jpegdec: Only enable rgb mode when there are 3 components.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-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 166c22306f..07883e2b72 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -279,7 +279,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 */ |