aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@ag.or.at>2012-03-18 13:08:08 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-03-18 14:06:59 +0100
commit7594ee2e6e9aada671c2958dea4848e828e9b178 (patch)
tree59ce4bb0de1cc4ca13f64b1108a945b1c5459e1e
parent0f6f5e6f16559cbcedb9780e05ca3de2ae08a3ac (diff)
downloadffmpeg-7594ee2e6e9aada671c2958dea4848e828e9b178.tar.gz
jpg: fix colors for sequential RGB
Fixes Ticket850 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 19d44e4bd7..4c8015f44e 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -1168,6 +1168,8 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, const uint8_t *mb_bitmask,
if(nb_components == 3 && s->nb_components == 3 && s->avctx->pix_fmt == PIX_FMT_GBR24P)
index = (i+2)%3;
+ if(nb_components == 1 && s->nb_components == 3 && s->avctx->pix_fmt == PIX_FMT_GBR24P)
+ index = (index+2)%3;
s->comp_index[i] = index;