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

Michael Niedermayer git at videolan.org
Mon Jan 20 22:41:51 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 19 16:44:58 2014 +0100| [b902ba478c81909422668fa7da7878848d792e52] | committer: Carl Eugen Hoyos

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

Fixes Ticket 3245
(cherry picked from commit ad8d063f230c05f8b5efbd05cc5a9f51a2549dcf)

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

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 97e0f12..27b0e5b 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -329,7 +329,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) {
             av_log_ask_for_sample(s->avctx, "progressively coded interlaced pictures not supported\n");
             return AVERROR_INVALIDDATA;



More information about the ffmpeg-cvslog mailing list