Fix assertion when only video or audio capture is selected (issue #1802)

This commit is contained in:
Marshall Greenblatt 2016-05-09 16:17:54 -04:00
parent 157f526d07
commit bff6dd684c
1 changed files with 14 additions and 11 deletions

View File

@ -2286,17 +2286,20 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
case content::MEDIA_ENUMERATE_DEVICES:
// Pick the desired device or fall back to the first available of the
// given type.
if (microphone_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_audio_device_id,
microphone_requested,
true,
false,
&devices);
}
if (webcam_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_video_device_id,
false,
webcam_requested,
true,
&devices);
}
break;
}
}