diff options
author | Youness Alaoui <youness.alaoui@collabora.co.uk> | 2011-08-25 23:36:27 +0000 |
---|---|---|
committer | Sebastian Dröge <sebastian.droege@collabora.co.uk> | 2011-08-26 09:51:46 +0200 |
commit | 42401da6867487920fb6b91fcb659b871bea9d99 (patch) | |
tree | 37b6bd033668bef4c6f6ea1a0301506b7237267a | |
parent | 39657fa52fc93bf7ebb60477bc40245b23867b5c (diff) |
hlsdemux: lock the update_thread mutex before stopping it
-rw-r--r-- | gst/hls/gsthlsdemux.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gst/hls/gsthlsdemux.c b/gst/hls/gsthlsdemux.c index 06f26a557..4c932ff60 100644 --- a/gst/hls/gsthlsdemux.c +++ b/gst/hls/gsthlsdemux.c @@ -379,7 +379,9 @@ gst_hls_demux_src_event (GstPad * pad, GstEvent * event) 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); /* wait for streaming to finish */ g_static_rec_mutex_lock (&demux->task_lock); @@ -649,7 +651,9 @@ gst_hls_demux_stop (GstHLSDemux * demux) g_mutex_unlock (demux->fetcher_lock); if (GST_TASK_STATE (demux->task) != GST_TASK_STOPPED) gst_task_stop (demux->task); + g_mutex_lock (demux->thread_lock); g_cond_signal (demux->thread_cond); + g_mutex_unlock (demux->thread_lock); } static void |