[longomatch] Get the xoverlay from the msg sender if null



commit 8ef632ed4b9aefe38e88184e7f08bcf0ca957cec
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Mon Jul 26 22:13:46 2010 +0200

    Get the xoverlay from the msg sender if null

 libcesarplayer/src/gst-camera-capturer.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/libcesarplayer/src/gst-camera-capturer.c b/libcesarplayer/src/gst-camera-capturer.c
index 8a59501..3cf85b7 100644
--- a/libcesarplayer/src/gst-camera-capturer.c
+++ b/libcesarplayer/src/gst-camera-capturer.c
@@ -1498,7 +1498,13 @@ gcc_element_msg_sync (GstBus * bus, GstMessage * msg, gpointer data)
     g_mutex_lock (gcc->priv->lock);
     gcc_update_interface_implementations (gcc);
     g_mutex_unlock (gcc->priv->lock);
-
+  
+    if (gcc->priv->xoverlay == NULL) {
+      GstObject *sender = GST_MESSAGE_SRC (msg);
+      if (sender && GST_IS_X_OVERLAY (sender))
+        gcc->priv->xoverlay = GST_X_OVERLAY (gst_object_ref (sender));
+    }  
+  
     g_return_if_fail (gcc->priv->xoverlay != NULL);
     g_return_if_fail (gcc->priv->video_window != NULL);
 



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