mpegvideo_parser: Set field_order.
authorMasaki Tanaka <maki.rxrz@gmail.com>
Tue, 9 Apr 2013 07:43:08 +0000 (16:43 +0900)
committerAnton Khirnov <anton@khirnov.net>
Fri, 3 May 2013 06:20:11 +0000 (08:20 +0200)
Signed-off-by: Anton Khirnov <anton@khirnov.net>
libavcodec/mpegvideo_parser.c

index 5364acf..3219c10 100644 (file)
@@ -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;
                 }