diff options
author | Tomas Härdin <tomas.hardin@codemill.se> | 2011-12-10 12:11:11 +0100 |
---|---|---|
committer | Janne Grunau <janne-libav@jannau.net> | 2012-01-22 14:40:53 +0100 |
commit | 1f5f8b26545c2c62c1600729963af282294c38ea (patch) | |
tree | c676571bdcc498389f9bc59a685154f34d39d25c | |
parent | 44deb9f68de2ba3fef0d39eeab0531cc842e1624 (diff) | |
download | ffmpeg-1f5f8b26545c2c62c1600729963af282294c38ea.tar.gz |
mxfdec: Add Avid's essence element key.
Signed-off-by: Janne Grunau <janne-libav@jannau.net>
-rw-r--r-- | libavformat/mxfdec.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c index 9de89abe2c..37f22a6dd7 100644 --- a/libavformat/mxfdec.c +++ b/libavformat/mxfdec.c @@ -217,6 +217,7 @@ typedef struct { /* partial keys to match */ static const uint8_t mxf_header_partition_pack_key[] = { 0x06,0x0e,0x2b,0x34,0x02,0x05,0x01,0x01,0x0d,0x01,0x02,0x01,0x01,0x02 }; static const uint8_t mxf_essence_element_key[] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0d,0x01,0x03,0x01 }; +static const uint8_t mxf_avid_essence_element_key[] = { 0x06,0x0e,0x2b,0x34,0x01,0x02,0x01,0x01,0x0e,0x04,0x03,0x01 }; static const uint8_t mxf_system_item_key[] = { 0x06,0x0E,0x2B,0x34,0x02,0x05,0x01,0x01,0x0D,0x01,0x03,0x01,0x04 }; static const uint8_t mxf_klv_key[] = { 0x06,0x0e,0x2b,0x34 }; /* complete keys to match */ @@ -390,7 +391,8 @@ static int mxf_read_packet(AVFormatContext *s, AVPacket *pkt) } return 0; } - if (IS_KLV_KEY(klv.key, mxf_essence_element_key)) { + if (IS_KLV_KEY(klv.key, mxf_essence_element_key) || + IS_KLV_KEY(klv.key, mxf_avid_essence_element_key)) { int index = mxf_get_stream_index(s, &klv); if (index < 0) { av_log(s, AV_LOG_ERROR, "error getting stream index %d\n", AV_RB32(klv.key+12)); @@ -1601,6 +1603,7 @@ static int mxf_read_header(AVFormatContext *s, AVFormatParameters *ap) av_dlog(s, "size %"PRIu64" offset %#"PRIx64"\n", klv.length, klv.offset); if (IS_KLV_KEY(klv.key, mxf_encrypted_triplet_key) || IS_KLV_KEY(klv.key, mxf_essence_element_key) || + IS_KLV_KEY(klv.key, mxf_avid_essence_element_key) || IS_KLV_KEY(klv.key, mxf_system_item_key)) { if (!mxf->current_partition->essence_offset) { compute_partition_essence_offset(s, mxf, &klv); |