mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 04:56:24 +00:00
dashdemux: update manifest streams correctly if pads aren't exposed
In some cases, it is possible that we need to update the manifest before pads have been exposed at all. If there are no current pads, just expose the next prepared streams. This doesn't handle the case where a manifest update would happen while a live streams is changing periods, which is a type of use case that we're unaware of real usages yet. https://bugzilla.gnome.org/show_bug.cgi?id=783028
This commit is contained in:
parent
33afa6bd18
commit
ead63a2686
1 changed files with 12 additions and 1 deletions
|
@ -2411,6 +2411,7 @@ gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux,
|
|||
guint period_idx;
|
||||
GList *iter;
|
||||
GList *streams_iter;
|
||||
GList *streams;
|
||||
|
||||
/* prepare the new manifest and try to transfer the stream position
|
||||
* status from the old manifest client */
|
||||
|
@ -2449,8 +2450,18 @@ gst_dash_demux_update_manifest_data (GstAdaptiveDemux * demux,
|
|||
return GST_FLOW_ERROR;
|
||||
}
|
||||
|
||||
/* If no pads have been exposed yet, need to use those */
|
||||
streams = NULL;
|
||||
if (demux->streams == NULL) {
|
||||
if (demux->prepared_streams) {
|
||||
streams = demux->prepared_streams;
|
||||
}
|
||||
} else {
|
||||
streams = demux->streams;
|
||||
}
|
||||
|
||||
/* update the streams to play from the next segment */
|
||||
for (iter = demux->streams, streams_iter = new_client->active_streams;
|
||||
for (iter = streams, streams_iter = new_client->active_streams;
|
||||
iter && streams_iter;
|
||||
iter = g_list_next (iter), streams_iter = g_list_next (streams_iter)) {
|
||||
GstDashDemuxStream *demux_stream = iter->data;
|
||||
|
|
Loading…
Reference in a new issue