Bug 1254102 - Don't skip Tab sources if the camera is in use. r=jesup a=ritu
authorGian-Carlo Pascutto <gcp@mozilla.com>
Tue, 15 Mar 2016 20:39:37 +0100
changeset 351379 455208471bc2d721af129c1678e369b69b8e706b
parent 351378 261a56c9e3487b42c3e73418f69ec51609afa505
child 351380 559ec5c54ac6293ed68625130cc6f7ab78ae61ab
push id15502
push userahunt@mozilla.com
push dateThu, 14 Apr 2016 20:27:48 +0000
reviewersjesup, ritu
bugs1254102
milestone47.0a2
Bug 1254102 - Don't skip Tab sources if the camera is in use. r=jesup a=ritu MozReview-Commit-ID: 7ZaebdnWj3R
dom/media/webrtc/MediaEngineWebRTC.cpp
--- a/dom/media/webrtc/MediaEngineWebRTC.cpp
+++ b/dom/media/webrtc/MediaEngineWebRTC.cpp
@@ -167,19 +167,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';