summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleix Conchillo FlaquƩ <aleix@oblong.com>2014-09-30 16:36:51 -0700
committerLuis de Bethencourt <luis.bg@samsung.com>2014-10-01 10:31:04 +0100
commit6c0c90c9d22a3c969e364d559f0a4174931bd08f (patch)
treece92b5602ba8952e699b23d96ffe6cb6f5fea07e
parent1badcd83c346391985432d51ece51ba7fa3eb09e (diff)
client: set session media to NULL without the lock
We need to set session medias to NULL without the client lock otherwise we can end up in a deadlock if another thread is waiting for the lock and media unprepare is also waiting for that thread to end. https://bugzilla.gnome.org/show_bug.cgi?id=737690
-rw-r--r--gst/rtsp-server/rtsp-client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c
index aa0ab98..b00993a 100644
--- a/gst/rtsp-server/rtsp-client.c
+++ b/gst/rtsp-server/rtsp-client.c
@@ -346,9 +346,6 @@ client_unwatch_session (GstRTSPClient * client, GstRTSPSession * session,
priv->session_removed_id = 0;
}
- /* unlink all media managed in this session */
- gst_rtsp_session_filter (session, filter_session_media, client);
-
/* remove the session */
g_object_unref (session);
}
@@ -357,6 +354,10 @@ static GstRTSPFilterResult
cleanup_session (GstRTSPClient * client, GstRTSPSession * sess,
gpointer user_data)
{
+ /* unlink all media managed in this session. This needs to happen
+ * without the client lock, so we really want to do it here. */
+ gst_rtsp_session_filter (sess, filter_session_media, client);
+
return GST_RTSP_FILTER_REMOVE;
}