Browse code

Forward interlaced field information from mov to ffv1 decoder.

Only read the information for old ffv1, level/version 3 saves
the information in the bitstream.
Fixes a part of ticket #2190.

Signed-off-by: Carl Eugen Hoyos <cehoyos@ag.or.at>

Tim.Nicholson authored on 2013/08/03 06:31:40
Showing 1 changed files
... ...
@@ -784,6 +784,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
784 784
 
785 785
     f->cur = p = f->picture.f;
786 786
 
787
+    if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) {
788
+        /* we have interlaced material flagged in container */
789
+        p->interlaced_frame = 1;
790
+        if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
791
+            p->top_field_first = 1;
792
+    }
793
+
787 794
     f->avctx = avctx;
788 795
     ff_init_range_decoder(c, buf, buf_size);
789 796
     ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);