summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYouness Alaoui <youness.alaoui@collabora.co.uk>2011-08-25 23:37:47 +0000
committerSebastian Dröge <sebastian.droege@collabora.co.uk>2011-08-26 09:51:46 +0200
commit46ac6a2589f4b40dadd9aa30b9a8dc5da47d484d (patch)
tree630c5be38809f989c2d37b92e8be712e8e18eb6b
parent015d1e11e211c18825856285d22d9b8e5bb5390d (diff)
hlsdemux: stop the threads in the proper order
first pause the task, then stop all fetchers, then stop the update thread then pause the task again, since it might have been restarted by another thread in the meantime
-rw-r--r--gst/hls/gsthlsdemux.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c
index 582507ab5..14695d566 100644
--- a/gst/hls/gsthlsdemux.c
+++ b/gst/hls/gsthlsdemux.c
@@ -375,13 +375,14 @@ gst_hls_demux_src_event (GstPad * pad, GstEvent * event)
}
demux->cancelled = TRUE;
+ gst_task_pause (demux->task);
g_mutex_lock (demux->fetcher_lock);
gst_hls_demux_stop_fetcher (demux, TRUE);
g_mutex_unlock (demux->fetcher_lock);
- gst_task_pause (demux->task);
g_mutex_lock (demux->thread_lock);
g_cond_signal (demux->thread_cond);
g_mutex_unlock (demux->thread_lock);
+ gst_task_pause (demux->task);
/* wait for streaming to finish */
g_static_rec_mutex_lock (&demux->task_lock);