[PATCH 6/8] extend MXFTrack with wrapping field

Maksym Veremeyenko verem at m1stereo.tv
Tue Jan 25 11:22:02 CET 2011


---
 libavformat/mxfdec.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 329285e..66c61b5 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -50,6 +50,11 @@
 #include "avformat.h"
 #include "mxf.h"
 
+enum MXFWrappingScheme {
+    Frame,
+    Clip,
+};
+
 typedef struct {
     UID uid;
     enum MXFMetadataSetType type;
@@ -83,6 +88,7 @@ typedef struct {
     int track_id;
     uint8_t track_number[4];
     AVRational edit_rate;
+    enum MXFWrappingScheme wrapping;
 } MXFTrack;
 
 typedef struct {
@@ -141,11 +147,6 @@ typedef struct {
     int local_tags_count;
 } MXFContext;
 
-enum MXFWrappingScheme {
-    Frame,
-    Clip,
-};
-
 typedef int MXFMetadataReadFunc(void *arg, AVIOContext *pb, int tag, int size, UID uid);
 
 typedef struct {
@@ -920,6 +921,7 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
         if (st->codec->codec_type != AVMEDIA_TYPE_DATA && container_ul && container_ul->wrapping == Clip) {
             av_log(mxf->fc, AV_LOG_WARNING, "only frame wrapped mappings are correctly supported\n");
             st->need_parsing = AVSTREAM_PARSE_FULL;
+            source_track->wrapping = Clip;
         }
     }
     return 0;
-- 
1.7.4


--------------080409060609020706050401
Content-Type: text/x-patch;
 name="0007-Clip-wrapped-code.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
 filename="0007-Clip-wrapped-code.patch"



More information about the libav-devel mailing list