mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-20 13:06:23 +00:00
hlsdemux: lock the update_thread mutex before stopping it
This commit is contained in:
parent
39657fa52f
commit
42401da686
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue