[FFmpeg-devel] [PATCH]Forward field information from mov container to decoded v210 frames
Carl Eugen Hoyos
cehoyos at ag.or.at
Sat Jul 27 10:43:14 CEST 2013
Hi!
As reported by Dave Rice on ffmpeg-user, ffmpeg does not keep field
(interlace-) information when reencoding v210.
Attached patch (by Tim Nicholson) fixes this afaict.
Please comment, Carl Eugen
-------------- next part --------------
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c
index 42e25cc..9a780a9 100644
--- a/libavcodec/v210dec.c
+++ b/libavcodec/v210dec.c
@@ -146,6 +146,13 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
v += pic->linesize[2] / 2 - avctx->width / 2;
}
+ if (avctx->field_order > AV_FIELD_PROGRESSIVE) { /* we have interlaced material flagged in conta
+iner */
+ pic->interlaced_frame = 1;
+ if (avctx->field_order == AV_FIELD_TT || avctx->field_order == AV_FIELD_TB)
+ pic->top_field_first = 1;
+ }
+
*got_frame = 1;
return avpkt->size;
More information about the ffmpeg-devel
mailing list