mxfdemux: Don't include any KLV packets between header metadata and index table segments in calculations

Minor fixup of last commit.
This commit is contained in:
Sebastian Dröge 2017-07-05 00:48:36 +03:00
parent 72b7794798
commit 37e0439e84

View file

@ -2016,11 +2016,20 @@ read_partition_header (GstMXFDemux * demux)
return;
}
while (demux->offset <
demux->run_in +
demux->current_partition->partition.this_partition +
demux->current_partition->partition.header_byte_count +
demux->current_partition->partition.index_byte_count) {
while (mxf_is_fill (&key)) {
demux->offset += read;
gst_buffer_unref (buf);
if (gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buf, &read)
!= GST_FLOW_OK)
return;
}
if (demux->current_partition->partition.index_byte_count
&& mxf_is_index_table_segment (&key)) {
guint64 index_end_offset =
demux->offset + demux->current_partition->partition.index_byte_count;
while (demux->offset < index_end_offset) {
if (mxf_is_index_table_segment (&key)) {
gst_mxf_demux_handle_index_table_segment (demux, &key, buf,
demux->offset);
@ -2028,10 +2037,12 @@ read_partition_header (GstMXFDemux * demux)
demux->offset += read;
gst_buffer_unref (buf);
if (gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buf, &read)
if (gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buf,
&read)
!= GST_FLOW_OK)
return;
}
}
while (mxf_is_fill (&key)) {
demux->offset += read;