Index: content/browser/renderer_host/media/media_devices_dispatcher_host.cc |
diff --git a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc |
index 2a28c625bb7c09e59f102e847de7f169efe66827..1c9487400bda64d5de29d1e8a749d65ef32fd642 100644 |
--- a/content/browser/renderer_host/media/media_devices_dispatcher_host.cc |
+++ b/content/browser/renderer_host/media/media_devices_dispatcher_host.cc |
@@ -407,10 +407,13 @@ media::VideoCaptureFormats MediaDevicesDispatcherHost::GetVideoInputFormats( |
const std::string& device_id) { |
DCHECK_CURRENTLY_ON(BrowserThread::IO); |
media::VideoCaptureFormats formats; |
- media_stream_manager_->video_capture_manager()->GetDeviceFormatsInUse( |
- MEDIA_DEVICE_VIDEO_CAPTURE, device_id, &formats); |
- if (!formats.empty()) |
+ base::Optional<media::VideoCaptureFormat> format = |
+ media_stream_manager_->video_capture_manager()->GetDeviceFormatInUse( |
+ MEDIA_DEVICE_VIDEO_CAPTURE, device_id); |
+ if (format.has_value()) { |
+ formats.push_back(format.value()); |
return formats; |
+ } |
media_stream_manager_->video_capture_manager()->GetDeviceSupportedFormats( |
device_id, &formats); |