[FFmpeg-cvslog] ljpeg: Check that lowres is 0 as lowres is not possible with ljpeg.

Michael Niedermayer git at videolan.org
Wed Dec 14 23:14:00 CET 2011


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 14 22:48:30 2011 +0100| [f129f593f70e0b922558fce21fc6ad819f7fe2e2] | committer: Michael Niedermayer

ljpeg: Check that lowres is 0 as lowres is not possible with ljpeg.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f129f593f70e0b922558fce21fc6ad819f7fe2e2
---

 libavcodec/mjpegdec.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index a1ff022..babf301 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);
 



More information about the ffmpeg-cvslog mailing list