changeset 4314:dfa0afd806c5 libavformat

parse mpeg2 progressive frame flag
author bcoudurier
date Sat, 31 Jan 2009 06:42:47 +0000
parents bdb984bfa3ed
children ea947a88be91
files mxfenc.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mxfenc.c	Sat Jan 31 06:32:12 2009 +0000
+++ b/mxfenc.c	Sat Jan 31 06:42:47 2009 +0000
@@ -58,6 +58,7 @@
     const UID *codec_ul;
     int64_t duration;
     int order; ///< interleaving order if dts are equal
+    int interlaced; ///< wether picture is interlaced
 } MXFStreamContext;
 
 typedef struct {
@@ -810,6 +811,8 @@
             if (i + 2 < pkt->size && (pkt->data[i+1] & 0xf0) == 0x10) { // seq ext
                 st->codec->profile = pkt->data[i+1] & 0x07;
                 st->codec->level   = pkt->data[i+2] >> 4;
+            } else if (i + 5 < pkt->size && (pkt->data[i+1] & 0xf0) == 0x80) { // pict coding ext
+                sc->interlaced = !(pkt->data[i+5] & 0x80); // progressive frame
                 break;
             }
         }