mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 20:21:24 +00:00
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:
parent
72b7794798
commit
37e0439e84
1 changed files with 21 additions and 10 deletions
|
@ -2016,23 +2016,34 @@ read_partition_header (GstMXFDemux * demux)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (demux->offset <
|
while (mxf_is_fill (&key)) {
|
||||||
demux->run_in +
|
|
||||||
demux->current_partition->partition.this_partition +
|
|
||||||
demux->current_partition->partition.header_byte_count +
|
|
||||||
demux->current_partition->partition.index_byte_count) {
|
|
||||||
if (mxf_is_index_table_segment (&key)) {
|
|
||||||
gst_mxf_demux_handle_index_table_segment (demux, &key, buf,
|
|
||||||
demux->offset);
|
|
||||||
}
|
|
||||||
demux->offset += read;
|
demux->offset += read;
|
||||||
|
|
||||||
gst_buffer_unref (buf);
|
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)
|
!= GST_FLOW_OK)
|
||||||
return;
|
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);
|
||||||
|
}
|
||||||
|
demux->offset += read;
|
||||||
|
|
||||||
|
gst_buffer_unref (buf);
|
||||||
|
if (gst_mxf_demux_pull_klv_packet (demux, demux->offset, &key, &buf,
|
||||||
|
&read)
|
||||||
|
!= GST_FLOW_OK)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
while (mxf_is_fill (&key)) {
|
while (mxf_is_fill (&key)) {
|
||||||
demux->offset += read;
|
demux->offset += read;
|
||||||
gst_buffer_unref (buf);
|
gst_buffer_unref (buf);
|
||||||
|
|
Loading…
Reference in a new issue