summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-11-30 17:58:32 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-11-30 17:58:32 +0000
commit1d57f71709d1310ba9aba4675b8652d2f75ec0a7 (patch)
treea0b111a270976ed83fdbdf25c63d08552058aaaa
parentd1242d04a1487f4db2e9b27643204332fd316b20 (diff)
downloadgst-plugins-bad-1d57f71709d1310ba9aba4675b8652d2f75ec0a7.tar.gz
gst-plugins-bad-1d57f71709d1310ba9aba4675b8652d2f75ec0a7.tar.bz2
gst-plugins-bad-1d57f71709d1310ba9aba4675b8652d2f75ec0a7.zip
gst/mxf/mxfdemux.c: If there's no descriptor for the track in the track's source package and there's a single descrip...
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_header_metadata_resolve_references): If there's no descriptor for the track in the track's source package and there's a single descriptor without a linked track assume that it belongs to this track.
-rw-r--r--ChangeLog8
-rw-r--r--gst/mxf/mxfdemux.c17
2 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index d966da55..7cb9ccdc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-11-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * gst/mxf/mxfdemux.c:
+ (gst_mxf_demux_handle_header_metadata_resolve_references):
+ If there's no descriptor for the track in the track's source
+ package and there's a single descriptor without a linked track
+ assume that it belongs to this track.
+
+2008-11-30 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* gst/mxf/mxfalaw.c: (mxf_is_alaw_essence_track):
* gst/mxf/mxfalaw.h:
* gst/mxf/mxfdemux.c:
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 6aebcf10..33be4378 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -1305,8 +1305,9 @@ 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;
}
@@ -1392,7 +1393,7 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
if (package->tracks && package->descriptors) {
for (j = 0; j < package->n_tracks; j++) {
MXFMetadataTrack *track = package->tracks[j];
- guint n_descriptor = 0;
+ guint i, n_descriptor = 0;
if (!track)
continue;
@@ -1406,14 +1407,15 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
e = (MXFMetadataFileDescriptor *) d;
- if (e->linked_track_id == track->track_id)
+ if (e->linked_track_id == track->track_id ||
+ e->linked_track_id == 0)
n_descriptor++;
}
track->n_descriptor = n_descriptor;
track->descriptor =
g_new0 (MXFMetadataFileDescriptor *, n_descriptor);
- n_descriptor = 0;
+ i = 0;
for (k = 0; k < package->n_descriptors; k++) {
MXFMetadataGenericDescriptor *d = package->descriptors[k];
@@ -1424,8 +1426,9 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
e = (MXFMetadataFileDescriptor *) d;
- if (e->linked_track_id == track->track_id)
- track->descriptor[n_descriptor++] = e;
+ if (e->linked_track_id == track->track_id ||
+ (e->linked_track_id == 0 && n_descriptor == 1))
+ track->descriptor[i++] = e;
}
}
}