pidgin.vv: 393df567: Hopefully stop the last of the BadWindow...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sun Jan 11 21:46:30 EST 2009


-----------------------------------------------------------------
Revision: 393df5675351df3da215dcd5417a1f2415af760f
Ancestor: f7c7581191e65d0eee37fb672d4e2d72367036ba
Author: maiku at soc.pidgin.im
Date: 2009-01-12T02:01:05
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/393df5675351df3da215dcd5417a1f2415af760f

Modified files:
        pidgin/gtkmedia.c

ChangeLog: 

Hopefully stop the last of the BadWindow errors.

-------------- next part --------------
============================================================
--- pidgin/gtkmedia.c	c16fe158c9e4c2532eb7b3103da2c5c304d30d5c
+++ pidgin/gtkmedia.c	a01bb89a130dbc8582ef1cb7fa25e192aa6660c2
@@ -350,10 +350,18 @@ create_window (GstBus *bus, GstMessage *
 	return TRUE;
 }
 
+static gboolean
+realize_cb_cb(GstElement *element)
+{
+	gst_element_set_locked_state(element, FALSE);
+	gst_element_set_state(element, GST_STATE_PLAYING);
+	return FALSE;
+}
+
 static void
 realize_cb(GtkWidget *widget, GstElement *element)
 {
-	gst_element_set_state(element, GST_STATE_PLAYING);
+	g_timeout_add(0, (GSourceFunc)realize_cb_cb, element);
 }
 
 static void
@@ -408,6 +416,7 @@ pidgin_media_ready_cb(PurpleMedia *media
 		} else if (type & PURPLE_MEDIA_VIDEO) {
 			if (!videosendbin && (type & PURPLE_MEDIA_SEND_VIDEO)) {
 				purple_media_video_init_src(&videosendbin);
+				gst_element_set_locked_state(videosendbin, TRUE);
 				purple_media_set_src(media, sessions->data, videosendbin);
 			}
 			if (!videorecvbool && (type & PURPLE_MEDIA_RECV_VIDEO)) {


More information about the Commits mailing list