aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2011-12-13 18:49:06 -0800
committerAlex Converse <alex.converse@gmail.com>2011-12-21 22:04:37 -0800
commit4bf3c8f226252e18de8051fd0d417c1d39857b67 (patch)
treef2b1bccb16202512c24bc080a683a092c8c4174f /libavcodec/mjpegdec.c
parentf264d336fe61c12ce9607c3060aa5d3dca947c61 (diff)
downloadffmpeg-4bf3c8f226252e18de8051fd0d417c1d39857b67.tar.gz
mov: Don't stick the QuickTime field ordering atom in extradata.
The 'fiel' atoms can be found in H.264 tracks clobbering the extradata. MJPEG supports non field based extradata, and this data should be preserved when copying.
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index 17e87ed65b..058b08fa83 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -110,12 +110,9 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
return AVERROR_INVALIDDATA;
}
}
- if (avctx->extradata_size > 9 &&
- AV_RL32(avctx->extradata + 4) == MKTAG('f','i','e','l')) {
- if (avctx->extradata[9] == 6) { /* quicktime icefloe 019 */
- s->interlace_polarity = 1; /* bottom field first */
- av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n");
- }
+ if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */
+ s->interlace_polarity = 1; /* bottom field first */
+ av_log(avctx, AV_LOG_DEBUG, "mjpeg bottom field first\n");
}
if (avctx->codec->id == CODEC_ID_AMV)
s->flipped = 1;