empathy r2397 - trunk/libempathy-gtk



Author: xclaesse
Date: Tue Feb  3 09:03:39 2009
New Revision: 2397
URL: http://svn.gnome.org/viewvc/empathy?rev=2397&view=rev

Log:
sink the videosink so we can hold a ref to it

Signed-off-by: Sjoerd Simons <sjoerd simons collabora co uk>

Modified:
   trunk/libempathy-gtk/empathy-video-widget.c

Modified: trunk/libempathy-gtk/empathy-video-widget.c
==============================================================================
--- trunk/libempathy-gtk/empathy-video-widget.c	(original)
+++ trunk/libempathy-gtk/empathy-video-widget.c	Tue Feb  3 09:03:39 2009
@@ -90,6 +90,9 @@
   EmpathyVideoWidgetPriv *priv = GET_PRIV (object);
 
   priv->videosink = gst_element_factory_make ("gconfvideosink", NULL);
+  gst_object_ref (priv->videosink);
+  gst_object_sink (priv->videosink);
+
   priv->sink_pad = gst_element_get_static_pad (priv->videosink, "sink");
 
   fs_element_added_notifier_add (priv->notifier, GST_BIN (priv->videosink));
@@ -192,6 +195,12 @@
 
   priv->bus = NULL;
 
+  if (priv->videosink != NULL)
+    g_object_unref (priv->videosink);
+
+  priv->videosink = NULL;
+
+
   /* release any references held by the object here */
 
   if (G_OBJECT_CLASS (empathy_video_widget_parent_class)->dispose)



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