From e3f042b99e9a039b9981a4b875f9c6aa59ef4a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Sat, 6 Dec 2008 20:46:46 +0000 Subject: [PATCH] gst/mxf/mxfdemux.c: The previous partition field of the partition is relative to the current partition and not to the... Original commit message from CVS: * gst/mxf/mxfdemux.c: (gst_mxf_demux_parse_footer_metadata): The previous partition field of the partition is relative to the current partition and not to the offset of the header partition. --- ChangeLog | 7 +++++++ gst/mxf/mxfdemux.c | 24 ++++++++++++++---------- 2 files changed, 21 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 6c35fbcea4..199c8b880e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-12-06 Sebastian Dröge + + * gst/mxf/mxfdemux.c: (gst_mxf_demux_parse_footer_metadata): + The previous partition field of the partition is relative + to the current partition and not to the offset of the header + partition. + 2008-12-06 Sebastian Dröge * gst/mxf/mxfd10.c: (mxf_d10_sound_handle_essence_element): diff --git a/gst/mxf/mxfdemux.c b/gst/mxf/mxfdemux.c index b8418fa23b..e991011678 100644 --- a/gst/mxf/mxfdemux.c +++ b/gst/mxf/mxfdemux.c @@ -1323,9 +1323,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; } @@ -2499,7 +2498,8 @@ next_try: goto out; offset = - demux->header_partition_pack_offset + demux->partition.prev_partition; + demux->header_partition_pack_offset + demux->partition.this_partition - + demux->partition.prev_partition; goto next_try; } @@ -2507,7 +2507,8 @@ next_try: ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read); if (G_UNLIKELY (ret != GST_FLOW_OK)) { offset = - demux->header_partition_pack_offset + demux->partition.prev_partition; + demux->header_partition_pack_offset + + demux->partition.this_partition - demux->partition.prev_partition; goto next_try; } @@ -2523,7 +2524,7 @@ next_try: buffer = NULL; offset = demux->header_partition_pack_offset + - demux->partition.prev_partition; + demux->partition.this_partition - demux->partition.prev_partition; goto next_try; } offset += read; @@ -2534,7 +2535,8 @@ next_try: gst_buffer_unref (buffer); buffer = NULL; offset = - demux->header_partition_pack_offset + demux->partition.prev_partition; + demux->header_partition_pack_offset + + demux->partition.this_partition - demux->partition.prev_partition; goto next_try; } } @@ -2544,7 +2546,8 @@ next_try: ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read); if (G_UNLIKELY (ret != GST_FLOW_OK)) { offset = - demux->header_partition_pack_offset + demux->partition.prev_partition; + demux->header_partition_pack_offset + + demux->partition.this_partition - demux->partition.prev_partition; goto next_try; } @@ -2558,7 +2561,7 @@ next_try: gst_mxf_demux_reset_metadata (demux); offset = demux->header_partition_pack_offset + - demux->partition.prev_partition; + demux->partition.this_partition - demux->partition.prev_partition; goto next_try; } } else if (mxf_is_fill (&key)) { @@ -2577,7 +2580,8 @@ next_try: || gst_mxf_demux_handle_header_metadata_update_streams (demux) != GST_FLOW_OK) { offset = - demux->header_partition_pack_offset + demux->partition.prev_partition; + demux->header_partition_pack_offset + demux->partition.this_partition - + demux->partition.prev_partition; goto next_try; }