aboutsummaryrefslogtreecommitdiff
path: root/libavformat/mxfenc.c
diff options
context:
space:
mode:
authorBaptiste Coudurier2009-01-31 06:42:47 +0000
committerBaptiste Coudurier2009-01-31 06:42:47 +0000
commit52e5cd2b1056a95a1b96147d27002aad2a2f692b (patch)
tree827d67c5c136d1f0d2b4f1143a87c0b2465375d4 /libavformat/mxfenc.c
parent7c7c1a76db08d3b91ac630c284b040cacc624039 (diff)
parse mpeg2 progressive frame flag
Originally committed as revision 16889 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mxfenc.c')
-rw-r--r--libavformat/mxfenc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavformat/mxfenc.c b/libavformat/mxfenc.c
index 3bec8df772..b2de458df3 100644
--- a/libavformat/mxfenc.c
+++ b/libavformat/mxfenc.c
@@ -58,6 +58,7 @@ typedef struct {
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 @@ static int mxf_parse_mpeg2_frame(AVFormatContext *s, AVStream *st, AVPacket *pkt
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;
}
}