aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-01-19 16:44:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-01-19 17:30:22 +0100
commitad8d063f230c05f8b5efbd05cc5a9f51a2549dcf (patch)
treebd544fc64d373aabab2406816b301545692b1b61 /libavcodec/mjpegdec.c
parent56072421559342c959de87a402b9d65de598f41e (diff)
downloadffmpeg-ad8d063f230c05f8b5efbd05cc5a9f51a2549dcf.tar.gz
avcodec/mjpegdec: Dont skip picture allocation if theres no picture allocated
Fixes Ticket 3245
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 5eebec423b..6a74226713 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;