avcodec/mjpegdec: Switch default interlaced polarity for MJPG to 1
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Mar 2014 17:01:04 +0000 (18:01 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 19 Mar 2014 17:16:42 +0000 (18:16 +0100)
Fixes Ticket3229

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/mjpegdec.c

index d019f65..123e4d0 100644 (file)
@@ -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