You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
chromium/chromium-60.0.3112.101-camf...

26 lines
1.1 KiB

diff -up chromium-60.0.3112.101/content/browser/renderer_host/media/media_devices_dispatcher_host.cc.camfix chromium-60.0.3112.101/content/browser/renderer_host/media/media_devices_dispatcher_host.cc
--- chromium-60.0.3112.101/content/browser/renderer_host/media/media_devices_dispatcher_host.cc.camfix 2017-08-16 17:02:07.177832503 -0400
+++ chromium-60.0.3112.101/content/browser/renderer_host/media/media_devices_dispatcher_host.cc 2017-08-16 17:02:56.378883520 -0400
@@ -6,6 +6,7 @@
#include <stddef.h>
+#include <algorithm>
#include <utility>
#include <vector>
@@ -454,6 +455,13 @@ media::VideoCaptureFormats MediaDevicesD
media_stream_manager_->video_capture_manager()->GetDeviceSupportedFormats(
device_id, &formats);
+ // Remove formats that have zero resolution.
+ formats.erase(std::remove_if(formats.begin(), formats.end(),
+ [](const media::VideoCaptureFormat& format) {
+ return format.frame_size.GetArea() <= 0;
+ }),
+ formats.end());
+
return formats;
}