[FFmpeg-devel] [PATCH 1/2] jpegdec: Only enable rgb mode when there are 3 components.
Michael Niedermayer
michaelni at gmx.at
Mon Jan 2 17:12:18 CET 2012
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
libavcodec/mjpegdec.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 166c223..07883e2 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 */
--
1.7.5.4
More information about the ffmpeg-devel
mailing list