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
This commit is contained in:
Aleix Conchillo Flaqué 2014-10-02 12:02:48 -07:00 committed by Wim Taymans
parent dde6a89928
commit 966065a018

View file

@ -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;
}
}
/**