summaryrefslogtreecommitdiffstats
path: root/gst/mxf
diff options
context:
space:
mode:
authorSebastian Dröge <slomo@circular-chaos.org>2008-11-27 08:49:08 +0000
committerSebastian Dröge <slomo@circular-chaos.org>2008-11-27 08:49:08 +0000
commite3337c6868321855331b955d21319ca718e9daa4 (patch)
tree0f4784bb3cf098539b9d65a229b9d8fdeee720bb /gst/mxf
parent8950978346a114e72d157f6925a0503f92a56dd0 (diff)
downloadgst-plugins-bad-e3337c6868321855331b955d21319ca718e9daa4.tar.gz
gst-plugins-bad-e3337c6868321855331b955d21319ca718e9daa4.tar.bz2
gst-plugins-bad-e3337c6868321855331b955d21319ca718e9daa4.zip
gst/mxf/mxfdemux.*: Only try to pull the footer metadata once and not on every KLV packet if it failed before.
Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_reset), (gst_mxf_demux_handle_klv_packet): * gst/mxf/mxfdemux.h: Only try to pull the footer metadata once and not on every KLV packet if it failed before.
Diffstat (limited to 'gst/mxf')
-rw-r--r--gst/mxf/mxfdemux.c11
-rw-r--r--gst/mxf/mxfdemux.h1
2 files changed, 9 insertions, 3 deletions
diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c
index 198aa284..11bd6dec 100644
--- a/gst/mxf/mxfdemux.c
+++ b/gst/mxf/mxfdemux.c
@@ -363,6 +363,8 @@ gst_mxf_demux_reset (GstMXFDemux * demux)
demux->footer_partition_pack_offset = 0;
demux->offset = 0;
+ demux->pull_footer_metadata = TRUE;
+
demux->run_in = -1;
memset (&demux->current_package_uid, 0, sizeof (MXFUMID));
@@ -1272,8 +1274,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;
}
@@ -2369,13 +2372,15 @@ gst_mxf_demux_handle_klv_packet (GstMXFDemux * demux, const MXFUL * key,
GstFlowReturn ret = GST_FLOW_OK;
/* In pull mode try to get the last metadata */
- if (!demux->final_metadata && demux->random_access && demux->partition.valid
+ if (demux->pull_footer_metadata && !demux->final_metadata
+ && demux->random_access && demux->partition.valid
&& demux->partition.type == MXF_PARTITION_PACK_HEADER
&& (!demux->partition.closed || !demux->partition.complete)
&& demux->footer_partition_pack_offset != 0) {
GST_DEBUG_OBJECT (demux,
"Open or incomplete header partition, trying to get final metadata from the last partitions");
gst_mxf_demux_parse_footer_metadata (demux);
+ demux->pull_footer_metadata = FALSE;
}
/* TODO: - Pull random index pack from footer partition?
diff --git a/gst/mxf/mxfdemux.h b/gst/mxf/mxfdemux.h
index 0452f808..83426d67 100644
--- a/gst/mxf/mxfdemux.h
+++ b/gst/mxf/mxfdemux.h
@@ -70,6 +70,7 @@ struct _GstMXFDemux
/* Structural metadata */
gboolean update_metadata;
gboolean final_metadata;
+ gboolean pull_footer_metadata;
MXFMetadataPreface preface;
GArray *identification;
MXFMetadataContentStorage content_storage;