summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-12-04 09:26:25 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-12-04 09:26:25 +0000
commit462980ec57cd3ab6bf6f44dc31925b783b714792 (patch)
treec1b7741ee023bc0d410b058c16a2d9fc1bc57f36
parentfff48b08f6ea7629279797013f9fce2196882523 (diff)
downloadgst-plugins-bad-462980ec57cd3ab6bf6f44dc31925b783b714792.tar.gz
gst-plugins-bad-462980ec57cd3ab6bf6f44dc31925b783b714792.tar.bz2
gst-plugins-bad-462980ec57cd3ab6bf6f44dc31925b783b714792.zip
gst/mxf/mxfdemux.c: Ignore zero sized essence elements. They're often inserted to fulfill the streaming requirements.
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_generic_container_essence_element): Ignore zero sized essence elements. They're often inserted to fulfill the streaming requirements.
-rw-r--r--ChangeLog7
-rw-r--r--gst/mxf/mxfdemux.c10
2 files changed, 15 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 660abdb8..cc8089e6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
2008-12-04 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+ * gst/mxf/mxfdemux.c:
+ (gst_mxf_demux_handle_generic_container_essence_element):
+ Ignore zero sized essence elements. They're often inserted
+ to fulfill the streaming requirements.
+
+2008-12-04 Sebastian Dröge <sebastian.droege@collabora.co.uk>
+
* gst/mxf/mxfparse.c:
(mxf_metadata_generic_picture_essence_descriptor_set_caps):
Fix setting of the height/width and PAR of video streams.
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index e20ddf7b..a389a056 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -1347,8 +1347,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;
}
@@ -2161,6 +2162,11 @@ gst_mxf_demux_handle_generic_container_essence_element (GstMXFDemux * demux,
return GST_FLOW_ERROR;
}
+ if (GST_BUFFER_SIZE (buffer) == 0) {
+ GST_DEBUG_OBJECT (demux, "Zero sized essence element, ignoring");
+ return GST_FLOW_OK;
+ }
+
track_number = GST_READ_UINT32_BE (&key->u[12]);
for (i = 0; i < demux->src->len; i++) {