From: Sebastian Dröge Date: Mon, 24 Nov 2008 11:31:27 +0000 (+0000) Subject: gst/mxf/mxfdemux.c: Make sure to only output generic container essence elements for... X-Git-Tag: GIT_CONVERSION~137 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=10adeafe8730c1db9eaab849c6b442f908b11412;p=platform%2Fupstream%2Fgst-plugins-bad.git gst/mxf/mxfdemux.c: Make sure to only output generic container essence elements for a track if the body SID of the su... Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_handle_generic_container_essence_element): Make sure to only output generic container essence elements for a track if the body SID of the surrounding partition is the same as the body SID of the track's source package. --- diff --git a/ChangeLog b/ChangeLog index 3e7cf2c..46a516a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2008-11-24 Sebastian Dröge + + * gst/mxf/mxfdemux.c: + (gst_mxf_demux_handle_generic_container_essence_element): + Make sure to only output generic container essence elements + for a track if the body SID of the surrounding partition is + the same as the body SID of the track's source package. + 2008-11-24 Julien Moutte * gst/flv/gstflvdemux.c: (gst_flv_demux_find_offset), diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index 484f32e..74ee525 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -1127,9 +1127,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; } @@ -1862,7 +1861,7 @@ gst_mxf_demux_handle_generic_container_essence_element (GstMXFDemux * demux, { GstFlowReturn ret = GST_FLOW_OK; guint32 track_number; - guint i; + guint i, j; GstMXFPad *pad = NULL; GstBuffer *inbuf; GstBuffer *outbuf = NULL; @@ -1890,8 +1889,24 @@ gst_mxf_demux_handle_generic_container_essence_element (GstMXFDemux * demux, (p->source_track->track_number == 0 && demux->src->len == 1 && demux->current_package->n_essence_tracks == 1)) { - pad = p; - break; + if (demux->essence_container_data) { + for (j = 0; j < demux->essence_container_data->len; j++) { + MXFMetadataEssenceContainerData *edata = + &g_array_index (demux->essence_container_data, + MXFMetadataEssenceContainerData, j); + + if (p->source_package == edata->linked_package + && demux->partition.body_sid == edata->body_sid) { + pad = p; + break; + } + } + } else { + pad = p; + } + + if (pad) + break; } }