changeset 26388:5906409c4b69

Fix some GStreamer timing issues.
author Mike Ruprecht <maiku@soc.pidgin.im>
date Thu, 19 Mar 2009 12:28:42 +0000
parents 189ac8d13103
children 5ee7e8f209bb
files libpurple/media.c
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/media.c	Thu Mar 19 12:26:01 2009 +0000
+++ b/libpurple/media.c	Thu Mar 19 12:28:42 2009 +0000
@@ -315,6 +315,7 @@
 	purple_media_manager_remove_media(priv->manager, PURPLE_MEDIA(media));
 
 	if (priv->confbin) {
+		gst_element_set_locked_state(priv->confbin, TRUE);
 		gst_element_set_state(GST_ELEMENT(priv->confbin),
 				GST_STATE_NULL);
 		gst_bin_remove(GST_BIN(purple_media_manager_get_pipeline(
@@ -1140,6 +1141,7 @@
 	if (session->src)
 		gst_object_unref(session->src);
 	session->src = src;
+	gst_element_set_locked_state(session->src, TRUE);
 	gst_bin_add(GST_BIN(session->media->priv->confbin),
 		    session->src);
 
@@ -1153,6 +1155,7 @@
 	purple_debug_info("media", "connecting pad: %s\n", 
 			  gst_pad_link(srcpad, sinkpad) == GST_PAD_LINK_OK
 			  ? "success" : "failure");
+	gst_element_set_locked_state(session->src, FALSE);
 }
 
 void