aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-18 23:59:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2011-06-19 03:54:16 +0200
commita09a3e8213c74be18855bab8aee4a7c44a05bdfe (patch)
treeb369d47f459ba00e4d61165d32a642d861ec90af /libavcodec/mjpegdec.c
parent0aed4f81fe5b9b15ab9b35baa4300f29ab03d65f (diff)
downloadffmpeg-a09a3e8213c74be18855bab8aee4a7c44a05bdfe.tar.gz
jpegdec: fix CJPG decoding.
Fixes ticket133 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c7
1 files changed, 5 insertions, 2 deletions
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;i<nb_components;i++)
s->last_dc[i] = 1024;