summaryrefslogtreecommitdiffstats
path: root/content
diff options
context:
space:
mode:
authormflodman@chromium.org <mflodman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 10:25:20 +0000
committermflodman@chromium.org <mflodman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-12-13 10:25:20 +0000
commit11b9ce078283a7457996a001f3d9911fafbe6a37 (patch)
treea84f9d313ccfd834fe8c20390676c4bc822558a7 /content
parent3e019f223c7a881a347fb7e9effa2fd2166e95a3 (diff)
downloadchromium_src-11b9ce078283a7457996a001f3d9911fafbe6a37.zip
chromium_src-11b9ce078283a7457996a001f3d9911fafbe6a37.tar.gz
chromium_src-11b9ce078283a7457996a001f3d9911fafbe6a37.tar.bz2
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
Diffstat (limited to 'content')
-rw-r--r--content/browser/renderer_host/media/media_stream_device_settings.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/content/browser/renderer_host/media/media_stream_device_settings.cc b/content/browser/renderer_host/media/media_stream_device_settings.cc
index b1eb952..433f3c2 100644
--- a/content/browser/renderer_host/media/media_stream_device_settings.cc
+++ b/content/browser/renderer_host/media/media_stream_device_settings.cc
@@ -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()));
}