}
static void
+gst_qtdemux_stream_flush_segments_data (GstQTDemux * qtdemux,
+ QtDemuxStream * stream)
+{
+ g_free (stream->segments);
+ stream->segments = NULL;
+ stream->segment_index = -1;
+ stream->accumulated_base = 0;
+}
+
+static void
gst_qtdemux_stream_flush_samples_data (GstQTDemux * qtdemux,
QtDemuxStream * stream)
{
g_free (stream->samples);
stream->samples = NULL;
- g_free (stream->segments);
- stream->segments = NULL;
gst_qtdemux_stbl_free (stream);
/* fragments */
stream->stbl_index = -1;
stream->n_samples = 0;
stream->time_position = 0;
- stream->segment_index = -1;
- stream->accumulated_base = 0;
}
static void
stream->sent_eos = FALSE;
stream->sparse = FALSE;
+ gst_qtdemux_stream_flush_segments_data (qtdemux, stream);
gst_qtdemux_stream_flush_samples_data (qtdemux, stream);
}
timestamp = GSTTIME_TO_QTSTREAMTIME (stream, qtdemux->fragment_start);
qtdemux->fragment_start = -1;
} else {
- if (G_UNLIKELY (stream->n_samples == 0)) {
+ if (stream->n_samples == 0) {
if (decode_ts > 0) {
timestamp = decode_ts;
} else if (stream->pending_seek != NULL) {
}
if (G_UNLIKELY (base_offset < -1))
goto lost_offset;
+
+ if (qtdemux->upstream_format_is_time)
+ gst_qtdemux_stream_flush_samples_data (qtdemux, stream);
+
/* Track Run node */
trun_node =
qtdemux_tree_get_child_by_type_full (traf_node, FOURCC_trun,
}
/* flush samples data from this track from previous moov */
+ gst_qtdemux_stream_flush_segments_data (qtdemux, stream);
gst_qtdemux_stream_flush_samples_data (qtdemux, stream);
}