From 72a57e792f76ae2ade17849a9672014b3bf951fc Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Tue, 1 Jul 2014 16:12:13 +0200 Subject: client: free watch context only once The watch context is freed when the source is destroyed. Avoids a CRITICAL when we try to unref the context twice. --- gst/rtsp-server/rtsp-client.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 57865f2..c60ba0a 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -3263,8 +3263,6 @@ handle_tunnel (GstRTSPClient * client) /* the old client owns the tunnel now, the new one will be freed */ g_source_destroy ((GSource *) priv->watch); priv->watch = NULL; - g_main_context_unref (priv->watch_context); - priv->watch_context = NULL; gst_rtsp_client_set_send_func (client, NULL, NULL, NULL); } @@ -3393,7 +3391,7 @@ gst_rtsp_client_attach (GstRTSPClient * client, GMainContext * context) * be superceeded by a cache object later */ gst_rtsp_watch_set_send_backlog (priv->watch, 0, 100); - GST_INFO ("attaching to context %p", context); + GST_INFO ("client %p: attaching to context %p", client, context); res = gst_rtsp_watch_attach (priv->watch, context); return res; -- cgit v1.2.3