changeset 26074:1199abde956b

Set the purple_media_connected_cb timeout to a high priority and remove it when stream is freed.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Mon, 02 Feb 2009 05:38:29 +0000
parents 39c1b30b26e2
children 1aed9a92b657
files libpurple/media.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Mon Feb 02 04:01:34 2009 +0000
+++ b/libpurple/media.c	Mon Feb 02 05:38:29 2009 +0000
@@ -240,6 +240,9 @@
 	if (stream == NULL)
 		return;
 
+	/* Remove the connected_cb timeout */
+	g_source_remove_by_user_data(stream);
+
 	g_free(stream->participant);
 
 	if (stream->local_candidates)
@@ -1685,7 +1688,8 @@
 	gst_pad_link(srcpad, sinkpad);
 	gst_element_set_state(stream->sink, GST_STATE_PLAYING);
 
-	g_timeout_add(0, (GSourceFunc)purple_media_connected_cb, stream);
+	g_timeout_add_full(G_PRIORITY_HIGH, 0,
+			(GSourceFunc)purple_media_connected_cb, stream, NULL);
 }
 
 static gboolean