Commit 24964f21 authored by Michael Niedermayer's avatar Michael Niedermayer

jpegdec: Only enable rgb mode when there are 3 components.

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0af34c4d
......@@ -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 */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment