summaryrefslogtreecommitdiffstats
path: root/gst/mxf
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-12-01 14:25:19 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-12-01 14:25:19 +0000
commitcffc0f920726841aa7c41bd418402adae5812488 (patch)
tree32aa0f15baefab3f8c2e281a371abb0ba2cf5441 /gst/mxf
parent1d57f71709d1310ba9aba4675b8652d2f75ec0a7 (diff)
downloadgst-plugins-bad-cffc0f920726841aa7c41bd418402adae5812488.tar.gz
gst-plugins-bad-cffc0f920726841aa7c41bd418402adae5812488.tar.bz2
gst-plugins-bad-cffc0f920726841aa7c41bd418402adae5812488.zip
gst/mxf/mxfdemux.c: If the preface references a primary package use this as the default playback package unless one w...
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_choose_package): If the preface references a primary package use this as the default playback package unless one was specified by the "package" property. If there's no preface primary package still try to use the first material package.
Diffstat (limited to 'gst/mxf')
-rw-r--r--gst/mxf/mxfdemux.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 33be4378..1bc0e7bf 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -1305,9 +1305,8 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
MXFMetadataEssenceContainerData, i);
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
- if (mxf_ul_is_equal (&demux->
- content_storage.essence_container_data_uids[j],
- &data->instance_uid)) {
+ if (mxf_ul_is_equal (&demux->content_storage.
+ essence_container_data_uids[j], &data->instance_uid)) {
demux->content_storage.essence_container_data[j] = data;
break;
}
@@ -1677,6 +1676,12 @@ gst_mxf_demux_choose_package (GstMXFDemux * demux)
GST_WARNING_OBJECT (demux,
"Current package not found, choosing the first best");
+ if (demux->preface.primary_package)
+ ret = demux->preface.primary_package;
+ if (ret && (ret->type == MXF_METADATA_GENERIC_PACKAGE_TOP_LEVEL_SOURCE
+ || ret->type == MXF_METADATA_GENERIC_PACKAGE_MATERIAL))
+ return ret;
+
if (!demux->material_package) {
GST_ERROR_OBJECT (demux, "No material package");
return NULL;