Blob Blame History Raw
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;
 }