gst_mxf_demux_handle_index_table_segment (GstMXFDemux * demux,
const MXFUL * key, GstBuffer * buffer, guint64 offset);
+static void collect_index_table_segments (GstMXFDemux * demux);
+
GType gst_mxf_demux_pad_get_type (void);
G_DEFINE_TYPE (GstMXFDemuxPad, gst_mxf_demux_pad, GST_TYPE_PAD);
guint64 old_offset = demux->offset;
MXFUL key;
GstMapInfo map;
+ GstFlowReturn flow_ret;
if (!gst_pad_peer_query_duration (demux->sinkpad, fmt, &filesize) ||
fmt != GST_FORMAT_BYTES || filesize == -1) {
return;
}
- gst_mxf_demux_handle_random_index_pack (demux, &key, buffer);
+ flow_ret = gst_mxf_demux_handle_random_index_pack (demux, &key, buffer);
gst_buffer_unref (buffer);
demux->offset = old_offset;
+
+ if (flow_ret == GST_FLOW_OK && !demux->index_table_segments_collected) {
+ collect_index_table_segments (demux);
+ demux->index_table_segments_collected = TRUE;
+ }
}
static void
buffer, peek);
} else if (mxf_is_random_index_pack (key)) {
ret = gst_mxf_demux_handle_random_index_pack (demux, key, buffer);
+
+ if (ret == GST_FLOW_OK && !demux->index_table_segments_collected) {
+ collect_index_table_segments (demux);
+ demux->index_table_segments_collected = TRUE;
+ }
} else if (mxf_is_index_table_segment (key)) {
ret =
gst_mxf_demux_handle_index_table_segment (demux, key, buffer,