summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorThiago Santos <thiagossantos@gmail.com>2017-05-29 22:47:10 -0700
committerEdward Hervey <bilboed@bilboed.com>2017-07-13 08:33:17 +0200
commitd5d7f01c381a9a48ae92b26d53f7545b7c1e0730 (patch)
tree91f7a4f20e79e7f81fced1e6582580dd1b30b278 /ext
parentf55356e4b31cdc111d12c86069a9a67ec57f505a (diff)
downloadgstreamer-plugins-bad-d5d7f01c381a9a48ae92b26d53f7545b7c1e0730.tar.gz
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
Diffstat (limited to 'ext')
-rw-r--r--ext/dash/gstdashdemux.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/ext/dash/gstdashdemux.c b/ext/dash/gstdashdemux.c
index 83bcb0302..0f96e339c 100644
--- a/ext/dash/gstdashdemux.c
+++ b/ext/dash/gstdashdemux.c
@@ -1787,6 +1787,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 */
@@ -1825,8 +1826,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;