diff options
author | Aleix Conchillo FlaquƩ <aleix@oblong.com> | 2014-10-02 12:02:48 -0700 |
---|---|---|
committer | Wim Taymans <wtaymans@redhat.com> | 2014-10-21 10:08:44 +0200 |
commit | 966065a018ee7abd3bbab6172d3a3e94abc027b0 (patch) | |
tree | 7274206a12d29c7353eaf498d3236e2a1555b98a | |
parent | dde6a899287df2689473293d2174d63f64375fcc (diff) |
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
-rw-r--r-- | gst/rtsp-server/rtsp-stream.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/gst/rtsp-server/rtsp-stream.c b/gst/rtsp-server/rtsp-stream.c index 456ddd9..be66e13 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; + } } /** |