From: Aleix Conchillo FlaquƩ Date: Thu, 2 Oct 2014 19:02:48 +0000 (-0700) Subject: stream: release lock even not all transports have been removed X-Git-Tag: 1.19.3~495^2~735 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=966065a018ee7abd3bbab6172d3a3e94abc027b0;p=platform%2Fupstream%2Fgstreamer.git stream: release lock even not all transports have been removed We don't want to keep the lock even we return FALSE because not all the transports have been removed. This could lead into a deadlock. https://bugzilla.gnome.org/show_bug.cgi?id=737797 --- diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 456ddd9941..be66e13466 100644 --- a/gst/rtsp-server/rtsp-stream.c +++ b/gst/rtsp-server/rtsp-stream.c @@ -1962,7 +1962,8 @@ gst_rtsp_stream_leave_bin (GstRTSPStream * stream, GstBin * bin, goto was_not_joined; /* all transports must be removed by now */ - g_return_val_if_fail (priv->transports == NULL, FALSE); + if (priv->transports != NULL) + goto transports_not_removed; clear_tr_cache (priv); @@ -2072,6 +2073,12 @@ was_not_joined: g_mutex_unlock (&priv->lock); return TRUE; } +transports_not_removed: + { + GST_ERROR_OBJECT (stream, "can't leave bin (transports not removed)"); + g_mutex_unlock (&priv->lock); + return FALSE; + } } /**