Commit 11b9ce07 authored by mflodman@chromium.org's avatar mflodman@chromium.org

Added size check for MediaStreamDeviceSettings fake UI.

When running the fake ui, behind the media stream flag, there is a missing check for available devices.


Review URL: http://codereview.chromium.org/8883042

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114205 0039d316-1c4b-4281-b951-d872f2087c98
parent 3e019f22
......@@ -124,12 +124,12 @@ void MediaStreamDeviceSettings::AvailableDevices(
}
}
}
if (num_media_requests != devices_to_use.size()) {
if (!request->devices[kVideoCapture].empty() &&
num_media_requests != devices_to_use.size()) {
// Not all requested device types were opened. This happens if all
// video capture devices are already opened, |in_use| isn't set for
// audio devices. Allow the first video capture device in the list to be
// opened for this user too.
DCHECK_NE(request->options.video_option, StreamOptions::kNoCamera);
StreamDeviceInfoArray device_array = (request->devices[kVideoCapture]);
devices_to_use.push_back(*(device_array.begin()));
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment