Commit ad8d063f authored by Michael Niedermayer's avatar Michael Niedermayer

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

Fixes Ticket 3245
parent 56072421
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment