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

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


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 19 16:44:58 2014 +0100| [30a94f1159d4715b1fae906925dd6e852269a2ac] | 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=30a94f1159d4715b1fae906925dd6e852269a2ac
---

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

diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 1de7732..c434de9 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -334,7 +334,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