aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-03-09 04:18:34 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2009-03-09 04:18:34 +0800
commitf91384647c6e8dbc5b8aebb58fdb96ab745376cf (patch)
treefd5082f9efbfd4a4a14e6370197928c1d109d09b
parentdafe7cf1759fb206760d84157d4695cec6cd826c (diff)
downloadgsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar.gz
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar.bz2
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar.lz
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar.xz
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.tar.zst
gsoc2013-empathy-f91384647c6e8dbc5b8aebb58fdb96ab745376cf.zip
Unref the video input and tee after removing
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> svn path=/trunk/; revision=2639
-rw-r--r--src/empathy-call-window.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index b94b20385..102395e57 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -889,8 +889,11 @@ empathy_call_window_sink_added_cb (EmpathyCallHandler *handler,
gst_pad_link (pad, sink);
break;
case TP_MEDIA_STREAM_TYPE_VIDEO:
- pad = gst_element_get_request_pad (priv->video_tee, "src%d");
- gst_pad_link (pad, sink);
+ if (priv->video_input != NULL)
+ {
+ pad = gst_element_get_request_pad (priv->video_tee, "src%d");
+ gst_pad_link (pad, sink);
+ }
break;
default:
g_assert_not_reached ();
@@ -952,6 +955,11 @@ empathy_call_window_remove_video_input (EmpathyCallWindow *self)
gst_bin_remove_many (GST_BIN (priv->pipeline), priv->video_input,
priv->video_tee, preview, NULL);
+
+ g_object_unref (priv->video_input);
+ priv->video_input = NULL;
+ g_object_unref (priv->video_tee);
+ priv->video_tee = NULL;
}