changeset 26183:f06eb6e7d907

merge of '1cd039d2f04c877820b4097e462f26831c2d828e' and 'fd3a51d3135cc4ef80591280934a987837bd3a2e'
author Mike Ruprecht <maiku@soc.pidgin.im>
date Thu, 05 Feb 2009 11:47:40 +0000
parents dcff28a0415c (current diff) 23038e1a1754 (diff)
children 8f1ce165de35 f44b5f61d4b7
files libpurple/media.c
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Thu Feb 05 10:25:28 2009 +0000
+++ b/libpurple/media.c	Thu Feb 05 11:47:40 2009 +0000
@@ -2418,10 +2418,6 @@
 
 		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);
@@ -2489,6 +2485,7 @@
 		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);
@@ -2529,6 +2526,7 @@
 	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);