mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 07:16:55 +00:00
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
This commit is contained in:
parent
015d1e11e2
commit
46ac6a2589
1 changed files with 2 additions and 1 deletions
|
@ -375,13 +375,14 @@ gst_hls_demux_src_event (GstPad * pad, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
demux->cancelled = TRUE;
|
demux->cancelled = TRUE;
|
||||||
|
gst_task_pause (demux->task);
|
||||||
g_mutex_lock (demux->fetcher_lock);
|
g_mutex_lock (demux->fetcher_lock);
|
||||||
gst_hls_demux_stop_fetcher (demux, TRUE);
|
gst_hls_demux_stop_fetcher (demux, TRUE);
|
||||||
g_mutex_unlock (demux->fetcher_lock);
|
g_mutex_unlock (demux->fetcher_lock);
|
||||||
gst_task_pause (demux->task);
|
|
||||||
g_mutex_lock (demux->thread_lock);
|
g_mutex_lock (demux->thread_lock);
|
||||||
g_cond_signal (demux->thread_cond);
|
g_cond_signal (demux->thread_cond);
|
||||||
g_mutex_unlock (demux->thread_lock);
|
g_mutex_unlock (demux->thread_lock);
|
||||||
|
gst_task_pause (demux->task);
|
||||||
|
|
||||||
/* wait for streaming to finish */
|
/* wait for streaming to finish */
|
||||||
g_static_rec_mutex_lock (&demux->task_lock);
|
g_static_rec_mutex_lock (&demux->task_lock);
|
||||||
|
|
Loading…
Reference in a new issue