The field dominance is an optional property in the MXF specifications. It shall
be assumed to be 1 (top field first) if not present.
----
Nicolas
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 7a4633f..7517285 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -152,6 +152,7 @@ typedef struct {
#define MXF_TFF 1
#define MXF_BFF 2
int field_dominance;
+ int field_dominance_present;
int channels;
int bits_per_sample;
unsigned int component_depth;
@@ -872,6 +873,7 @@ static int mxf_read_generic_descriptor(void *arg,
AVIOContext *pb, int tag, int
break;
case 0x3212:
descriptor->field_dominance = avio_r8(pb);
+ descriptor->field_dominance_present = 1;
break;
case 0x3301:
descriptor->component_depth = avio_rb32(pb);
@@ -1595,6 +1597,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
case MixedFields:
break;
case SeparateFields:
+ if (!descriptor->field_dominance_present)
+ descriptor->field_dominance = MXF_TFF;
switch (descriptor->field_dominance) {
case MXF_TFF:
st->codec->field_order = AV_FIELD_TT;
_______________________________________________
ffmpeg-devel mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel