mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
hlsdemux: do not broadcast the fetcher_cond on bus error if we're cancelled
If we cancel the fetch and call the stop_fetcher, which holds the lock, when it sets the fetcher's state to NULL, it might send an error on the bus. In that case, we must ignore it, otherwise it will try to take the lock and will block forever.
This commit is contained in:
parent
fc0fe37b10
commit
cb30cd242c
1 changed files with 5 additions and 3 deletions
|
@ -787,9 +787,11 @@ gst_hls_demux_fetcher_bus_handler (GstBus * bus,
|
|||
|
||||
if (GST_MESSAGE_TYPE (message) == GST_MESSAGE_ERROR) {
|
||||
demux->fetcher_error = TRUE;
|
||||
g_mutex_lock (demux->fetcher_lock);
|
||||
g_cond_broadcast (demux->fetcher_cond);
|
||||
g_mutex_unlock (demux->fetcher_lock);
|
||||
if (!demux->cancelled) {
|
||||
g_mutex_lock (demux->fetcher_lock);
|
||||
g_cond_broadcast (demux->fetcher_cond);
|
||||
g_mutex_unlock (demux->fetcher_lock);
|
||||
}
|
||||
}
|
||||
|
||||
gst_message_unref (message);
|
||||
|
|
Loading…
Reference in a new issue