summaryrefslogtreecommitdiff
path: root/gst/hls
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-15 10:53:58 +0200
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2012-10-15 10:55:12 +0200
commit113ccb1a532febf32274bf8561adf303c7f90c6e (patch)
treed40899ee53d584062f5c1d20a95d9c9c1e0c0eeb /gst/hls
parentb335f5a68e111611aa91af79317a7569310599f4 (diff)
downloadgstreamer-plugins-bad-113ccb1a532febf32274bf8561adf303c7f90c6e.tar.gz
hlsdemux: Also cancel the downloader before stopping the playlist update task
Diffstat (limited to 'gst/hls')
-rw-r--r--gst/hls/gsthlsdemux.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index da1192f37..eb18a258d 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -139,6 +139,7 @@ gst_hls_demux_dispose (GObject * obj)
if (demux->updates_task) {
if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) {
GST_DEBUG_OBJECT (demux, "Leaving updates task");
+ gst_uri_downloader_cancel (demux->downloader);
gst_task_stop (demux->updates_task);
g_mutex_lock (&demux->updates_timed_lock);
GST_TASK_SIGNAL (demux->updates_task);
@@ -323,6 +324,7 @@ gst_hls_demux_change_state (GstElement * element, GstStateChange transition)
switch (transition) {
case GST_STATE_CHANGE_PLAYING_TO_PAUSED:
+ gst_uri_downloader_cancel (demux->downloader);
gst_task_stop (demux->updates_task);
g_mutex_lock (&demux->updates_timed_lock);
GST_TASK_SIGNAL (demux->updates_task);
@@ -628,6 +630,7 @@ gst_hls_demux_stop (GstHLSDemux * demux)
if (GST_TASK_STATE (demux->updates_task) != GST_TASK_STOPPED) {
demux->stop_stream_task = TRUE;
+ gst_uri_downloader_cancel (demux->downloader);
gst_task_stop (demux->updates_task);
g_mutex_lock (&demux->updates_timed_lock);
GST_TASK_SIGNAL (demux->updates_task);