aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-video-widget.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-video-widget.c b/libempathy-gtk/empathy-video-widget.c
index 7941b3198..3723f50d3 100644
--- a/libempathy-gtk/empathy-video-widget.c
+++ b/libempathy-gtk/empathy-video-widget.c
@@ -90,6 +90,9 @@ empathy_video_widget_constructed (GObject *object)
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 @@ empathy_video_widget_dispose (GObject *object)
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)