aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat
diff options
context:
space:
mode:
authorMark Reid <mindmark@gmail.com>2016-09-18 14:11:34 -0700
committerMichael Niedermayer <michael@niedermayer.cc>2016-09-21 01:29:20 +0200
commitd8d433321796c3eaf47d93e1091a20cbd3c44bda (patch)
tree378aefd918641ccae72e4e81b180777ac0dfe86b /libavformat
parentfa0780d644c65924e4a3baa762461d3cc23655d0 (diff)
downloadffmpeg-d8d433321796c3eaf47d93e1091a20cbd3c44bda.tar.gz
avformat/mxfdec: use first valid sourceclip found if material track has multiple components
This commit fixes a issue with mxf footage having multiple components on a material track. Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-rw-r--r--libavformat/mxfdec.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libavformat/mxfdec.c b/libavformat/mxfdec.c
index 0b16463f82..1939761b67 100644
--- a/libavformat/mxfdec.c
+++ b/libavformat/mxfdec.c
@@ -1888,7 +1888,11 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
}
}
- /* TODO: handle multiple source clips */
+ /* TODO: handle multiple source clips, only finds first valid source clip */
+ if(material_track->sequence->structural_components_count > 1)
+ av_log(mxf->fc, AV_LOG_WARNING, "material track %d: has %d components\n",
+ material_track->track_id, material_track->sequence->structural_components_count);
+
for (j = 0; j < material_track->sequence->structural_components_count; j++) {
component = mxf_resolve_sourceclip(mxf, &material_track->sequence->structural_components_refs[j]);
if (!component)
@@ -1914,6 +1918,8 @@ static int mxf_parse_structural_metadata(MXFContext *mxf)
av_log(mxf->fc, AV_LOG_ERROR, "material track %d: no corresponding source track found\n", material_track->track_id);
break;
}
+ if(source_track && component)
+ break;
}
if (!source_track || !component || !source_package)
continue;