mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-31 11:32:38 +00:00
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:
parent
dde6a89928
commit
966065a018
1 changed files with 8 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue