client: use g_source_destroy()
authorWim Taymans <wim.taymans@collabora.co.uk>
Thu, 11 Jun 2009 09:27:47 +0000 (11:27 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 11 Jun 2009 09:27:47 +0000 (11:27 +0200)
We need to use g_source_destroy() because we might have added the source to a
different main context than the default one.

gst/rtsp-server/rtsp-client.c

index 4d245b7..e12d425 100644 (file)
@@ -1411,7 +1411,8 @@ tunnel_complete (GstRTSPWatch * watch, gpointer user_data)
   g_object_unref (oclient);
 
   /* we don't need this watch anymore */
-  g_source_remove (client->watchid);
+  g_source_destroy ((GSource *) client->watch);
+  client->watchid = 0;
 
   return GST_RTSP_OK;