[FFmpeg-cvslog] rawdec.c: Extract interlace information from quicktime flag if it exisits.

Tim Nicholson git at videolan.org
Mon Oct 15 18:54:07 CEST 2012


ffmpeg | branch: master | Tim Nicholson <Tim.Nicholson at bbc.co.uk> | Mon Oct 15 09:47:38 2012 +0100| [0ee57f8b1476ad39260e97b58af04c5092c2d9ed] | committer: Michael Niedermayer

rawdec.c: Extract interlace information from quicktime flag if it exisits.

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=0ee57f8b1476ad39260e97b58af04c5092c2d9ed
---

 libavcodec/rawdec.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavcodec/rawdec.c b/libavcodec/rawdec.c
index 3496bb0..eb96deb 100644
--- a/libavcodec/rawdec.c
+++ b/libavcodec/rawdec.c
@@ -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;
 }
 



More information about the ffmpeg-cvslog mailing list