From f43c14d0467f8095b31babcd337e3547852a82a0 Mon Sep 17 00:00:00 2001 From: Masaki Tanaka Date: Tue, 9 Apr 2013 16:43:08 +0900 Subject: [PATCH] mpegvideo_parser: Set field_order. Signed-off-by: Anton Khirnov --- libavcodec/mpegvideo_parser.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index 5364acf92a..3219c10977 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -114,6 +114,14 @@ static void mpegvideo_extract_headers(AVCodecParserContext *s, s->repeat_pict = 2; } } + + if (!pc->progressive_sequence) { + if (top_field_first) + s->field_order = AV_FIELD_TT; + else + s->field_order = AV_FIELD_BB; + } else + s->field_order = AV_FIELD_PROGRESSIVE; } break; }