Fix assertion when only video or audio capture is selected (issue #1802)
This commit is contained in:
parent
157f526d07
commit
bff6dd684c
|
@ -2286,17 +2286,20 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
|
||||||
case content::MEDIA_ENUMERATE_DEVICES:
|
case content::MEDIA_ENUMERATE_DEVICES:
|
||||||
// Pick the desired device or fall back to the first available of the
|
// Pick the desired device or fall back to the first available of the
|
||||||
// given type.
|
// given type.
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
if (microphone_requested) {
|
||||||
request.requested_audio_device_id,
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
microphone_requested,
|
request.requested_audio_device_id,
|
||||||
false,
|
true,
|
||||||
&devices);
|
false,
|
||||||
|
&devices);
|
||||||
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
}
|
||||||
request.requested_video_device_id,
|
if (webcam_requested) {
|
||||||
false,
|
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
|
||||||
webcam_requested,
|
request.requested_video_device_id,
|
||||||
&devices);
|
false,
|
||||||
|
true,
|
||||||
|
&devices);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue