mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
dashdemux: Seek on the new streams if the seek caused a period switch
Seeking on the old streams is pointless, they are going to be freed on the next opportunity.
This commit is contained in:
parent
fa9b03186a
commit
9e8e1c452d
1 changed files with 4 additions and 1 deletions
|
@ -1082,6 +1082,7 @@ gst_dash_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
|
||||||
GstStreamPeriod *period;
|
GstStreamPeriod *period;
|
||||||
GList *iter;
|
GList *iter;
|
||||||
GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
|
GstDashDemux *dashdemux = GST_DASH_DEMUX_CAST (demux);
|
||||||
|
gboolean switched_period = FALSE;
|
||||||
|
|
||||||
gst_event_parse_seek (seek, &rate, &format, &flags, &start_type, &start,
|
gst_event_parse_seek (seek, &rate, &format, &flags, &start_type, &start,
|
||||||
&stop_type, &stop);
|
&stop_type, &stop);
|
||||||
|
@ -1120,10 +1121,12 @@ gst_dash_demux_seek (GstAdaptiveDemux * demux, GstEvent * seek)
|
||||||
if (!gst_mpd_client_set_period_index (dashdemux->client, current_period)
|
if (!gst_mpd_client_set_period_index (dashdemux->client, current_period)
|
||||||
|| !gst_dash_demux_setup_all_streams (dashdemux))
|
|| !gst_dash_demux_setup_all_streams (dashdemux))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
switched_period = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update the current sequence on all streams */
|
/* Update the current sequence on all streams */
|
||||||
for (iter = demux->streams; iter; iter = g_list_next (iter)) {
|
for (iter = (switched_period ? demux->next_streams : demux->streams); iter;
|
||||||
|
iter = g_list_next (iter)) {
|
||||||
GstDashDemuxStream *dashstream = iter->data;
|
GstDashDemuxStream *dashstream = iter->data;
|
||||||
|
|
||||||
if (flags & GST_SEEK_FLAG_FLUSH) {
|
if (flags & GST_SEEK_FLAG_FLUSH) {
|
||||||
|
|
Loading…
Reference in a new issue