mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
hlsdemux: lock the fetcher mutex before stopping it
This commit is contained in:
parent
e1a0bdcdf5
commit
39657fa52f
1 changed files with 4 additions and 0 deletions
|
@ -375,7 +375,9 @@ gst_hls_demux_src_event (GstPad * pad, GstEvent * event)
|
||||||
}
|
}
|
||||||
|
|
||||||
demux->cancelled = TRUE;
|
demux->cancelled = TRUE;
|
||||||
|
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);
|
||||||
gst_task_pause (demux->task);
|
gst_task_pause (demux->task);
|
||||||
g_cond_signal (demux->thread_cond);
|
g_cond_signal (demux->thread_cond);
|
||||||
|
|
||||||
|
@ -642,7 +644,9 @@ gst_hls_demux_stop_fetcher (GstHLSDemux * demux, gboolean cancelled)
|
||||||
static void
|
static void
|
||||||
gst_hls_demux_stop (GstHLSDemux * demux)
|
gst_hls_demux_stop (GstHLSDemux * demux)
|
||||||
{
|
{
|
||||||
|
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);
|
||||||
if (GST_TASK_STATE (demux->task) != GST_TASK_STOPPED)
|
if (GST_TASK_STATE (demux->task) != GST_TASK_STOPPED)
|
||||||
gst_task_stop (demux->task);
|
gst_task_stop (demux->task);
|
||||||
g_cond_signal (demux->thread_cond);
|
g_cond_signal (demux->thread_cond);
|
||||||
|
|
Loading…
Reference in a new issue