diff --git a/libavcodec/mpegvideo_parser.c b/libavcodec/mpegvideo_parser.c index d36bc7af1e..f127218d21 100644 --- a/libavcodec/mpegvideo_parser.c +++ b/libavcodec/mpegvideo_parser.c @@ -118,6 +118,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; } diff --git a/libavcodec/vc1_parser.c b/libavcodec/vc1_parser.c index 53af61c5da..9086cf41df 100644 --- a/libavcodec/vc1_parser.c +++ b/libavcodec/vc1_parser.c @@ -88,6 +88,11 @@ static void vc1_extract_headers(AVCodecParserContext *s, AVCodecContext *avctx, } } + if (vpc->v.broadcast && vpc->v.interlace && !vpc->v.psf) + s->field_order = vpc->v.tff ? AV_FIELD_TT : AV_FIELD_BB; + else + s->field_order = AV_FIELD_PROGRESSIVE; + break; } }