Fix crash on invalid chromeMediaSourceId (fixes #3911)

This commit is contained in:
Marshall Greenblatt
2025-03-31 12:11:33 -04:00
parent 0bf995ae26
commit b2f5ab6cd2

View File

@ -215,9 +215,11 @@ class CefMediaAccessQuery {
content::DesktopMediaID(content::DesktopMediaID::TYPE_SCREEN,
-1 /* webrtc::kFullDesktopScreenId */);
}
if (media_id.type != content::DesktopMediaID::TYPE_NONE) {
video_devices.emplace_back(request_.video_type, media_id.ToString(),
"Screen");
}
}
blink::mojom::StreamDevicesSetPtr stream_devices_set =
blink::mojom::StreamDevicesSet::New();