[FFmpeg-devel] [PATCH]Set interlace properties when decoding old ffv1 in mov
Carl Eugen Hoyos
cehoyos at ag.or.at
Fri Aug 2 13:03:01 CEST 2013
Hi!
FFV1 version 3 saves interlace properties per frame, for older streams,
this patch fixes (a remaining part of) ticket #2190.
Please review, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/ffv1dec.c b/libavcodec/ffv1dec.c
index 17b8946..2fe511e 100644
--- a/libavcodec/ffv1dec.c
+++ b/libavcodec/ffv1dec.c
@@ -784,6 +784,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPac
f->cur = p = f->picture.f;
+ if (f->version < 3 && avctx->field_order > AV_FIELD_PROGRESSIVE) {
+ /* we have interlaced material flagged in container */
+ p->interlaced_frame = 1;
+ if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
+ p->top_field_first = 1;
+ }
+
f->avctx = avctx;
ff_init_range_decoder(c, buf, buf_size);
ff_build_rac_states(c, 0.05 * (1LL << 32), 256 - 8);
More information about the ffmpeg-devel
mailing list