rawdec.c: Extract interlace information from quicktime flag if it exisits.
authorTim Nicholson <Tim.Nicholson@bbc.co.uk>
Mon, 15 Oct 2012 08:47:38 +0000 (09:47 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 15 Oct 2012 16:53:44 +0000 (18:53 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/rawdec.c

index 3496bb0..eb96deb 100644 (file)
@@ -129,6 +129,13 @@ static av_cold int raw_init_decoder(AVCodecContext *avctx)
         avctx->codec_tag == MKTAG(3, 0, 0, 0) || avctx->codec_tag == MKTAG('W','R','A','W'))
         context->flip=1;
 
+    if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /*we have interlaced material flagged in container */
+        avctx->coded_frame->interlaced_frame = 1;
+        if (avctx->field_order == AV_FIELD_TT  || avctx->field_order == AV_FIELD_TB)
+            avctx->coded_frame->top_field_first = 1;
+    }
+
+
     return 0;
 }