From d4368444343b3237b9d8cd0dcff17a55036ba614 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 12 Feb 2014 18:06:43 +0100 Subject: [PATCH] uridownloader: Fix potential deadlock The streaming thread might use our lock, so shutting down the element while holding that lock calls for problems. --- gst-libs/gst/uridownloader/gsturidownloader.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gst-libs/gst/uridownloader/gsturidownloader.c b/gst-libs/gst/uridownloader/gsturidownloader.c index 6f9f539787..f858631f64 100644 --- a/gst-libs/gst/uridownloader/gsturidownloader.c +++ b/gst-libs/gst/uridownloader/gsturidownloader.c @@ -461,9 +461,11 @@ quit: gst_bus_set_sync_handler (downloader->priv->bus, NULL, NULL, NULL); /* set the element state to NULL */ + GST_OBJECT_UNLOCK (downloader); gst_bus_set_flushing (downloader->priv->bus, TRUE); gst_element_set_state (urisrc, GST_STATE_NULL); gst_element_get_state (urisrc, NULL, NULL, GST_CLOCK_TIME_NONE); + GST_OBJECT_LOCK (downloader); gst_element_set_bus (urisrc, NULL); /* unlink the source element from the internal pad */