diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 4e58feffad..d80dad78b7 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -993,8 +993,11 @@ int ff_mjpeg_decode_sos(MJpegDecodeContext *s, predictor= get_bits(&s->gb, 8); /* JPEG Ss / lossless JPEG predictor /JPEG-LS NEAR */ ilv= get_bits(&s->gb, 8); /* JPEG Se / JPEG-LS ILV */ - prev_shift = get_bits(&s->gb, 4); /* Ah */ - point_transform= get_bits(&s->gb, 4); /* Al */ + if(s->avctx->codec_tag != AV_RL32("CJPG")){ + prev_shift = get_bits(&s->gb, 4); /* Ah */ + point_transform= get_bits(&s->gb, 4); /* Al */ + }else + prev_shift= point_transform= 0; for(i=0;ilast_dc[i] = 1024;