From: Ognyan Tonchev Date: Wed, 2 Apr 2014 10:03:32 +0000 (+0200) Subject: client: remove watch of the second client after http tunnel setup X-Git-Tag: 1.19.3~495^2~825 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=132f77751d72b9942de25aee4071ba27b9829d28;p=platform%2Fupstream%2Fgstreamer.git client: remove watch of the second client after http tunnel setup The second client will be freed after the HTTP tunnel has been set up. Make sure it's RTSP watch is never dispatched again. Fixes https://bugzilla.gnome.org/show_bug.cgi?id=727488 --- diff --git a/gst/rtsp-server/rtsp-client.c b/gst/rtsp-server/rtsp-client.c index 30c6b4d..c3c34eb 100644 --- a/gst/rtsp-server/rtsp-client.c +++ b/gst/rtsp-server/rtsp-client.c @@ -3031,9 +3031,15 @@ tunnel_complete (GstRTSPWatch * watch, gpointer user_data) /* merge the tunnels into the first client */ gst_rtsp_connection_do_tunnel (opriv->connection, priv->connection); + gst_rtsp_watch_reset (priv->watch); gst_rtsp_watch_reset (opriv->watch); g_object_unref (oclient); + /* the old client owns the tunnel now, the new one will be freed */ + g_source_destroy ((GSource *) priv->watch); + priv->watch = NULL; + gst_rtsp_client_set_send_func (client, NULL, NULL, NULL); + return GST_RTSP_OK; /* ERRORS */