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.
This commit is contained in:
Sebastian Dröge 2008-12-06 20:46:46 +00:00
parent f4cb76e92d
commit e3f042b99e
2 changed files with 21 additions and 10 deletions

View file

@ -1,3 +1,10 @@
2008-12-06 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* 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 <sebastian.droege@collabora.co.uk> 2008-12-06 Sebastian Dröge <sebastian.droege@collabora.co.uk>
* gst/mxf/mxfd10.c: (mxf_d10_sound_handle_essence_element): * gst/mxf/mxfd10.c: (mxf_d10_sound_handle_essence_element):

View file

@ -1323,9 +1323,8 @@ gst_mxf_demux_handle_header_metadata_resolve_references (GstMXFDemux * demux)
MXFMetadataEssenceContainerData, i); MXFMetadataEssenceContainerData, i);
for (j = 0; j < demux->content_storage.n_essence_container_data; j++) { for (j = 0; j < demux->content_storage.n_essence_container_data; j++) {
if (mxf_ul_is_equal (&demux-> if (mxf_ul_is_equal (&demux->content_storage.
content_storage.essence_container_data_uids[j], essence_container_data_uids[j], &data->instance_uid)) {
&data->instance_uid)) {
demux->content_storage.essence_container_data[j] = data; demux->content_storage.essence_container_data[j] = data;
break; break;
} }
@ -2499,7 +2498,8 @@ next_try:
goto out; goto out;
offset = 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; goto next_try;
} }
@ -2507,7 +2507,8 @@ next_try:
ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read); ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read);
if (G_UNLIKELY (ret != GST_FLOW_OK)) { if (G_UNLIKELY (ret != GST_FLOW_OK)) {
offset = 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; goto next_try;
} }
@ -2523,7 +2524,7 @@ next_try:
buffer = NULL; buffer = NULL;
offset = offset =
demux->header_partition_pack_offset + demux->header_partition_pack_offset +
demux->partition.prev_partition; demux->partition.this_partition - demux->partition.prev_partition;
goto next_try; goto next_try;
} }
offset += read; offset += read;
@ -2534,7 +2535,8 @@ next_try:
gst_buffer_unref (buffer); gst_buffer_unref (buffer);
buffer = NULL; buffer = NULL;
offset = 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; goto next_try;
} }
} }
@ -2544,7 +2546,8 @@ next_try:
ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read); ret = gst_mxf_demux_pull_klv_packet (demux, offset, &key, &buffer, &read);
if (G_UNLIKELY (ret != GST_FLOW_OK)) { if (G_UNLIKELY (ret != GST_FLOW_OK)) {
offset = 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; goto next_try;
} }
@ -2558,7 +2561,7 @@ next_try:
gst_mxf_demux_reset_metadata (demux); gst_mxf_demux_reset_metadata (demux);
offset = offset =
demux->header_partition_pack_offset + demux->header_partition_pack_offset +
demux->partition.prev_partition; demux->partition.this_partition - demux->partition.prev_partition;
goto next_try; goto next_try;
} }
} else if (mxf_is_fill (&key)) { } else if (mxf_is_fill (&key)) {
@ -2577,7 +2580,8 @@ next_try:
|| gst_mxf_demux_handle_header_metadata_update_streams (demux) != || gst_mxf_demux_handle_header_metadata_update_streams (demux) !=
GST_FLOW_OK) { GST_FLOW_OK) {
offset = 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; goto next_try;
} }