pidgin.vv: fd3a51d3: Fix intermittent crash upon hangup when ...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Thu Feb 5 07:21:14 EST 2009


-----------------------------------------------------------------
Revision: fd3a51d3135cc4ef80591280934a987837bd3a2e
Ancestor: 8abcc61528a93f4c18a6e1f200a7ba69f1694c28
Author: maiku at soc.pidgin.im
Date: 2009-02-05T11:47:36
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/fd3a51d3135cc4ef80591280934a987837bd3a2e

Modified files:
        libpurple/media.c

ChangeLog: 

Fix intermittent crash upon hangup when removing output windows.

-------------- next part --------------
============================================================
--- libpurple/media.c	e2ef7645f360b887a83b9b314c509c1c885fa82c
+++ libpurple/media.c	db99998c0a3c59f4fe862037d5c0be281f05bf7d
@@ -2338,10 +2338,6 @@ purple_media_set_output_window(PurpleMed
 
 		bin = gst_bin_new(NULL);
 
-		if (stream->sink != NULL)
-			gst_bin_add(GST_BIN(GST_ELEMENT_PARENT(
-					stream->sink)), bin);
-
 		name = g_strdup_printf("stream-sink_%s_%s",
 				session_id, participant);
 		sink = gst_element_factory_make("autovideosink", name);
@@ -2409,6 +2405,7 @@ purple_media_remove_output_window(Purple
 		gst_element_release_request_pad(GST_ELEMENT_PARENT(peer), peer);
 		gst_object_unref(peer);
 
+		gst_element_set_locked_state(sink, TRUE);
 		gst_element_set_state(sink, GST_STATE_NULL);
 
 		gst_bin_remove(GST_BIN(GST_ELEMENT_PARENT(sink)), sink);
@@ -2449,6 +2446,7 @@ purple_media_remove_output_window(Purple
 	peer = gst_pad_get_peer(pad);
 	gst_object_unref(pad);
 	gst_pad_set_blocked_async(peer, TRUE, dummy_block_cb, NULL);
+	gst_element_set_locked_state(sink, TRUE);
 	gst_element_set_state(sink, GST_STATE_NULL);
 	gst_bin_remove(GST_BIN(parent), sink);
 


More information about the Commits mailing list