[FFmpeg-devel] [PATCH 07/11] libavformat/mxfdec.c: Parse timecode component data_definition_ul and duration.

Alexis Ballier aballier at gentoo.org
Wed Oct 21 18:01:01 CEST 2015


---
 libavformat/mxfdec.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 1320fad..2b776f6 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -121,6 +121,8 @@ typedef struct MXFSequence {
 typedef struct MXFTimecodeComponent {
     UID uid;
     enum MXFMetadataSetType type;
+    UID data_definition_ul;
+    int64_t duration;
     int drop_frame;
     int start_frame;
     struct AVRational rate;
@@ -747,6 +749,12 @@ static int mxf_read_timecode_component(void *arg, AVIOContext *pb, int tag, int
 {
     MXFTimecodeComponent *mxf_timecode = arg;
     switch(tag) {
+    case 0x0201:
+        avio_read(pb, mxf_timecode->data_definition_ul, 16);
+        break;
+    case 0x0202:
+        mxf_timecode->duration = avio_rb64(pb);
+        break;
     case 0x1501:
         mxf_timecode->start_frame = avio_rb64(pb);
         break;
-- 
2.6.2



More information about the ffmpeg-devel mailing list