From f25f43bb57d892d433d5a61e40d100440fd0f222 Mon Sep 17 00:00:00 2001 From: Guillaume Desmottes Date: Mon, 21 Nov 2011 13:50:14 +0100 Subject: restart the camera only if it's already running Always restarting it will enable the camera in an audio only call. https://bugzilla.gnome.org/show_bug.cgi?id=664459 --- src/empathy-call-window.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/empathy-call-window.c') diff --git a/src/empathy-call-window.c b/src/empathy-call-window.c index 6e2df7961..7a4994c93 100644 --- a/src/empathy-call-window.c +++ b/src/empathy-call-window.c @@ -4181,10 +4181,17 @@ empathy_call_window_change_webcam (EmpathyCallWindow *self, const gchar *device) { EmpathyGstVideoSrc *video; + gboolean running; + /* Restart the camera only if it's already running */ + running = (self->priv->video_preview != NULL); video = empathy_call_window_get_video_src (self); - empathy_call_window_play_camera (self, FALSE); + if (running) + empathy_call_window_play_camera (self, FALSE); + empathy_video_src_change_device (video, device); - empathy_call_window_play_camera (self, TRUE); + + if (running) + empathy_call_window_play_camera (self, TRUE); } -- cgit v1.2.3