summaryrefslogtreecommitdiff
path: root/libavcodec/mjpegdec.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-03-19 18:01:04 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-03-19 18:16:42 +0100
commitdde16f5aaed327e15049b40a8dfae1f59647e4ec (patch)
treebd82fbabb5cbc7eaa9e26d193b1e4ab5b1934c70 /libavcodec/mjpegdec.c
parent493296800c4cfd76561f71ded5f0893108063e67 (diff)
avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1
Fixes Ticket3229 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mjpegdec.c')
-rw-r--r--libavcodec/mjpegdec.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c
index d019f655f2..123e4d0da2 100644
--- a/libavcodec/mjpegdec.c
+++ b/libavcodec/mjpegdec.c
@@ -131,6 +131,9 @@ av_cold int ff_mjpeg_decode_init(AVCodecContext *avctx)
if (avctx->field_order == AV_FIELD_BB) { /* quicktime icefloe 019 */
s->interlace_polarity = 1; /* bottom field first */
av_log(avctx, AV_LOG_DEBUG, "bottom field first\n");
+ } else if (avctx->field_order == AV_FIELD_UNKNOWN) {
+ if (avctx->codec_tag == AV_RL32("MJPG"))
+ s->interlace_polarity = 1;
}
if ( avctx->extradata_size > 8