[FFmpeg-cvslog] avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated

Michael Niedermayer git at videolan.org
Sun Jan 19 17:34:59 CET 2014


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 19 16:44:58 2014 +0100| [ad8d063f230c05f8b5efbd05cc5a9f51a2549dcf] | committer: Michael Niedermayer

avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated

Fixes Ticket 3245

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

 libavcodec/mjpegdec.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 5eebec4..6a74226 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -336,7 +336,7 @@ int ff_mjpeg_decode_sof(MJpegDecodeContext *s)
         s->first_picture = 0;
     }
 
-    if (s->interlaced && (s->bottom_field == !s->interlace_polarity)) {
+    if (s->got_picture && s->interlaced && (s->bottom_field == !s->interlace_polarity)) {
         if (s->progressive) {
             avpriv_request_sample(s->avctx, "progressively coded interlaced picture");
             return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list