Bug 1254102 - Don't skip Tab sources if the camera is in use. r?jesup draft
authorGian-Carlo Pascutto <gcp@mozilla.com>
Tue, 15 Mar 2016 20:39:37 +0100
changeset 341107 bf5e6511a8c3c201a0a4bb658b21b949f902a709
parent 340999 341344bdec8f10bf50646cd6ef2355361435cbf6
child 341108 e61caa5682e69558bc92cbf99b8f9c816c69ba62
child 341169 c15cfd378b07ca99ef05af84888b7aaf4fe312cb
child 341179 1a464ab9077a79de45cd415bc7483f24574a15c4
push id13146
push usergpascutto@mozilla.com
push dateWed, 16 Mar 2016 16:23:30 +0000
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';