[totem] Release the global lock when calling into playbin2



commit b055fb4ea078311436bbba5130e700e6bf5e93f1
Author: Jan Schmidt <thaytan noraisin net>
Date:   Wed Sep 30 20:37:40 2009 +0100

    Release the global lock when calling into playbin2
    
    As a workaround for a deadlock, release the global lock when
    asking playbin2 for a reference to the video sink.

 src/backend/bacon-video-widget-gst-0.10.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/backend/bacon-video-widget-gst-0.10.c b/src/backend/bacon-video-widget-gst-0.10.c
index 5500d99..e963d46 100644
--- a/src/backend/bacon-video-widget-gst-0.10.c
+++ b/src/backend/bacon-video-widget-gst-0.10.c
@@ -5950,6 +5950,7 @@ bvw_update_interface_implementations (BaconVideoWidget *bvw)
   GstElement *video_sink = NULL;
   GstElement *element = NULL;
   GstIterator *iter;
+  GstElement *play;
 
   if (g_thread_self() != gui_thread) {
     if (bvw->priv->balance)
@@ -5969,8 +5970,14 @@ bvw_update_interface_implementations (BaconVideoWidget *bvw)
     return;
   }
 
+  play = gst_object_ref(bvw->priv->play);
+
+  g_mutex_unlock (bvw->priv->lock);
   g_object_get (bvw->priv->play, "video-sink", &video_sink, NULL);
   g_assert (video_sink != NULL);
+  g_mutex_lock (bvw->priv->lock);
+
+  gst_object_unref(play);
 
   /* We try to get an element supporting XOverlay interface */
   if (GST_IS_BIN (video_sink)) {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]