summaryrefslogtreecommitdiff
path: root/libavformat
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-02 05:23:59 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-02 05:23:59 +0100
commit23e48cd01fbd314ea0d8ab0a6bb00be3e1c8afec (patch)
treedbd6d2e1121a8d588694ffd09eff752ab3937116 /libavformat
parent8fb67c102655dd4de08d99176039d7a404540b06 (diff)
parentc716624853339ea4b1086a3957b334829370204c (diff)
Merge commit 'c716624853339ea4b1086a3957b334829370204c'
* commit 'c716624853339ea4b1086a3957b334829370204c': mxf: Read field dominance flag Conflicts: libavformat/mxfdec.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 8551adae68..0e877e3966 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -148,9 +148,11 @@ typedef struct {
int width;
int height; /* Field height, not frame height */
int frame_layout; /* See MXFFrameLayout enum */
+#define MXF_TFF 1
+#define MXF_BFF 2
+ int field_dominance;
int channels;
int bits_per_sample;
- int field_dominance;
unsigned int component_depth;
unsigned int horiz_subsampling;
unsigned int vert_subsampling;
@@ -1555,7 +1557,21 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
case MixedFields:
break;
case SeparateFields:
- st->codec->height *= 2; /* Turn field height into frame height. */
+ switch (descriptor->field_dominance) {
+ case MXF_TFF:
+ st->codec->field_order = AV_FIELD_TT;
+ break;
+ case MXF_BFF:
+ st->codec->field_order = AV_FIELD_BB;
+ break;
+ default:
+ avpriv_request_sample(mxf->fc,
+ "Field dominance %d support",
+ descriptor->field_dominance);
+ break;
+ }
+ /* Turn field height into frame height. */
+ st->codec->height *= 2;
break;
default:
av_log(mxf->fc, AV_LOG_INFO, "Unknown frame layout type: %d\n", descriptor->frame_layout);