summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSeungha Yang <sh.yang@lge.com>2017-06-04 20:23:36 +0900
committerEdward Hervey <bilboed@bilboed.com>2017-06-12 16:10:39 +0200
commit14f8808bf2d8b8e7fd2988a9622a6ce059a89b1c (patch)
treeebc3bc0be9628de5b0f273396b74e90307c2a741
parent799b1670bbae8bf38f92280151eb43d8d41e0b67 (diff)
downloadgstreamer-plugins-bad-14f8808bf2d8b8e7fd2988a9622a6ce059a89b1c.tar.gz
adaptivedemux: Clear "cancelled" on uridownloader before processing manifest
Previous commit let demux call gst_uri_downloader_cancel() on _demux_reset(). Note that, _demux_reset() called during PAUSED_TO_READY and READY_TO_PAUSED. And, it will set "cancelled" on uridownloader which blocks the use of uridownloader. The issue is that, subclass can use the uridownloader not only live streaming for manifest update, but also for fetching another manifests such as variant and rendition m3u8 of hls streaming. So to unblock it, demux should clear "cancelled" before processing initial manifest. https://bugzilla.gnome.org/show_bug.cgi?id=783401
-rw-r--r--gst-libs/gst/adaptivedemux/gstadaptivedemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
index 392e1e114..3c98eac12 100644
--- a/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
+++ b/gst-libs/gst/adaptivedemux/gstadaptivedemux.c
@@ -567,6 +567,9 @@ gst_adaptive_demux_change_state (GstElement * element,
case GST_STATE_CHANGE_READY_TO_PAUSED:
GST_MANIFEST_LOCK (demux);
gst_adaptive_demux_reset (demux);
+ /* Clear "cancelled" flag in uridownloader since subclass might want to
+ * use uridownloader to fetch another manifest */
+ gst_uri_downloader_reset (demux->downloader);
if (demux->priv->have_manifest)
gst_adaptive_demux_start_manifest_update_task (demux);
demux->running = TRUE;