Bug 1254102 - Don't skip Tab sources if the camera is in use. r=jesup
authorGian-Carlo Pascutto <gcp@mozilla.com>
Tue, 15 Mar 2016 20:39:37 +0100
changeset 289255 a0a16898e8db0ded551630b2dae95be9a268ef1c
parent 289254 a6e3806b9aff041e2f76c39dd788b431b798c7f5
child 289256 1ffc09b6908f450f96b3504b2b2b7cfe5f9bf6c2
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup
bugs1254102
milestone48.0a1
Bug 1254102 - Don't skip Tab sources if the camera is in use. r=jesup MozReview-Commit-ID: 7ZaebdnWj3R
dom/media/webrtc/MediaEngineWebRTC.cpp
--- a/dom/media/webrtc/MediaEngineWebRTC.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTC.cpp
@@ -215,19 +215,16 @@ MediaEngineWebRTC::EnumerateVideoDevices
    * Enumeration is not neccessary if GIPS reports the same set of devices
    * for a given instance of the engine. Likewise, if a device was plugged out,
    * mVideoSources must be updated.
    */
   int num;
   num = mozilla::camera::GetChildAndCall(
     &mozilla::camera::CamerasChild::NumberOfCaptureDevices,
     capEngine);
-  if (num <= 0) {
-    return;
-  }
 
   for (int i = 0; i < num; i++) {
     char deviceName[MediaEngineSource::kMaxDeviceNameLength];
     char uniqueId[MediaEngineSource::kMaxUniqueIdLength];
 
     // paranoia
     deviceName[0] = '\0';
     uniqueId[0] = '\0';