]> git.0d.be Git - empathy.git/commitdiff
Unref the video input and tee after removing
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>
Sun, 8 Mar 2009 20:18:34 +0000 (20:18 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Sun, 8 Mar 2009 20:18:34 +0000 (20:18 +0000)
Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
svn path=/trunk/; revision=2639

src/empathy-call-window.c

index b94b2038505c8db066364804747cbfa5fcb37018..102395e57faf465df7263454a06307d3326b3b72 100644 (file)
@@ -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;
 }