mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
uridownloader: Fix potential deadlock
The streaming thread might use our lock, so shutting down the element while holding that lock calls for problems.
This commit is contained in:
parent
8cd6208b7d
commit
d436844434
1 changed files with 2 additions and 0 deletions
|
@ -461,9 +461,11 @@ quit:
|
||||||
gst_bus_set_sync_handler (downloader->priv->bus, NULL, NULL, NULL);
|
gst_bus_set_sync_handler (downloader->priv->bus, NULL, NULL, NULL);
|
||||||
|
|
||||||
/* set the element state to NULL */
|
/* set the element state to NULL */
|
||||||
|
GST_OBJECT_UNLOCK (downloader);
|
||||||
gst_bus_set_flushing (downloader->priv->bus, TRUE);
|
gst_bus_set_flushing (downloader->priv->bus, TRUE);
|
||||||
gst_element_set_state (urisrc, GST_STATE_NULL);
|
gst_element_set_state (urisrc, GST_STATE_NULL);
|
||||||
gst_element_get_state (urisrc, NULL, NULL, GST_CLOCK_TIME_NONE);
|
gst_element_get_state (urisrc, NULL, NULL, GST_CLOCK_TIME_NONE);
|
||||||
|
GST_OBJECT_LOCK (downloader);
|
||||||
gst_element_set_bus (urisrc, NULL);
|
gst_element_set_bus (urisrc, NULL);
|
||||||
|
|
||||||
/* unlink the source element from the internal pad */
|
/* unlink the source element from the internal pad */
|
||||||
|
|
Loading…
Reference in a new issue