rtsp-client: do not destroy the rtsp watch

Don't destroy the client watch while dispatching.  The rtsp watch is
automatically destroyed after the rtsp watch function closed() has
been called.

Fixes https://bugzilla.gnome.org/show_bug.cgi?id=685220
This commit is contained in:
Patricia Muscalu 2012-10-01 16:13:50 +02:00 committed by Wim Taymans
parent 7164532536
commit 870b8db279

View file

@ -202,6 +202,9 @@ gst_rtsp_client_finalize (GObject * obj)
GST_INFO ("finalize client %p", client); GST_INFO ("finalize client %p", client);
if (client->watchid)
g_source_destroy ((GSource *) client->watch);
client_cleanup_sessions (client); client_cleanup_sessions (client);
gst_rtsp_connection_free (client->connection); gst_rtsp_connection_free (client->connection);
@ -536,11 +539,6 @@ close_connection (GstRTSPClient * client)
} }
gst_rtsp_connection_close (client->connection); gst_rtsp_connection_close (client->connection);
if (client->watchid) {
g_source_destroy ((GSource *) client->watch);
client->watchid = 0;
client->watch = NULL;
}
} }
static gboolean static gboolean
@ -1942,11 +1940,6 @@ tunnel_complete (GstRTSPWatch * watch, gpointer user_data)
gst_rtsp_watch_reset (oclient->watch); gst_rtsp_watch_reset (oclient->watch);
g_object_unref (oclient); g_object_unref (oclient);
/* we don't need this watch anymore */
g_source_destroy ((GSource *) client->watch);
client->watchid = 0;
client->watch = NULL;
return GST_RTSP_OK; return GST_RTSP_OK;
/* ERRORS */ /* ERRORS */