aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-window.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c
index 56d3ab285..a1c7c625e 100644
--- a/src/empathy-call-window.c
+++ b/src/empathy-call-window.c
@@ -622,13 +622,20 @@ create_audio_output (EmpathyCallWindow *self)
}
static void
-initialize_input_elements (GstBus *bus, EmpathyCallWindow *self)
+create_video_input (EmpathyCallWindow *self)
{
EmpathyCallWindowPriv *priv = GET_PRIV (self);
+ g_assert (priv->video_input == NULL);
priv->video_input = empathy_video_src_new ();
gst_object_ref (priv->video_input);
gst_object_sink (priv->video_input);
+}
+
+static void
+initialize_input_elements (GstBus *bus, EmpathyCallWindow *self)
+{
+ EmpathyCallWindowPriv *priv = GET_PRIV (self);
priv->audio_input = empathy_audio_src_new ();
gst_object_ref (priv->audio_input);
@@ -1016,6 +1023,7 @@ empathy_call_window_init (EmpathyCallWindow *self)
create_pipeline (self);
create_audio_output (self);
+ create_video_input (self);
priv->fsnotifier = fs_element_added_notifier_new ();
fs_element_added_notifier_add (priv->fsnotifier, GST_BIN (priv->pipeline));
@@ -1494,10 +1502,6 @@ empathy_call_window_reset_pipeline (EmpathyCallWindow *self)
g_object_unref (priv->pipeline);
priv->pipeline = NULL;
- if (priv->video_input != NULL)
- g_object_unref (priv->video_input);
- priv->video_input = NULL;
-
if (priv->audio_input != NULL)
g_object_unref (priv->audio_input);
priv->audio_input = NULL;