]> git.0d.be Git - empathy.git/blobdiff - src/empathy-camera-menu.c
Merge remote-tracking branch 'jonny/ft'
[empathy.git] / src / empathy-camera-menu.c
index 6a7d20c15e47e81b3a1599becf0487b5cb601d81..9633d84fa2b78eb2674c92e3c3c573f55230fde9 100644 (file)
@@ -132,6 +132,7 @@ empathy_camera_menu_activate_cb (GtkAction *action,
 {
   EmpathyGstVideoSrc *video;
   const gchar *device;
+  gchar *current_device;
 
   if (self->priv->in_update)
     return;
@@ -139,8 +140,16 @@ empathy_camera_menu_activate_cb (GtkAction *action,
   video = empathy_call_window_get_video_src (self->priv->window);
 
   device = gtk_action_get_name (action);
+  current_device = empathy_video_src_dup_device (video);
 
-  empathy_video_src_change_device (video, device);
+  /* Don't change the device if it's the currently used one */
+  if (!tp_strdiff (device, current_device))
+    goto out;
+
+  empathy_call_window_change_webcam (self->priv->window, device);
+
+ out:
+  g_free (current_device);
 }
 
 static void