aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-12-14 22:48:30 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-12-14 22:50:49 +0100
commitf129f593f70e0b922558fce21fc6ad819f7fe2e2 (patch)
tree179c3caa8d6a1ee45c65cb88dc69446101fd57ec /libavcodec
parentdc5f0018784895198919beb8a7bf47c423ed210f (diff)
downloadffmpeg-f129f593f70e0b922558fce21fc6ad819f7fe2e2.tar.gz
ljpeg: Check that lowres is 0 as lowres is not possible with ljpeg.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/mjpegdec.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a1ff022712..babf3016df 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -233,6 +233,11 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
return -1;
}
+ if(s->lossless && s->avctx->lowres){
+ av_log(s->avctx, AV_LOG_ERROR, "lowres is not possible with lossless jpeg\n");
+ return -1;
+ }
+
height = get_bits(&s->gb, 16);
width = get_bits(&s->gb, 16);