Index: content/browser/renderer_host/media/video_capture_device_client.cc |
diff --git a/content/browser/renderer_host/media/video_capture_device_client.cc b/content/browser/renderer_host/media/video_capture_device_client.cc |
index a70f59921ce5e42a5c00ae38a0fbf1569ae03267..86aebf9844d6df9ac3da5447c32c4e50789a1317 100644 |
--- a/content/browser/renderer_host/media/video_capture_device_client.cc |
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc |
@@ -217,7 +217,13 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData( |
// The input |length| can be greater than the required buffer size because of |
// paddings and/or alignments, but it cannot be smaller. |
- DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize()); |
+ if (static_cast<size_t>(length) < frame_format.ImageAllocationSize()) { |
mcasas
2016/09/27 14:36:01
IIUC, the DCHECK has never been hit before
except
magjed_chromium
2016/09/27 15:19:56
ManyCam doesn't work for the bug reporter in any b
mcasas
2016/09/28 16:39:22
I'm not sure this is the right thing to do.
1- si
magjed_chromium
2016/09/29 11:00:35
1. That's an unrelated change, but sure, I moved t
mcasas
2016/09/29 20:43:31
The crash is only present in Win, and Manycam is a
|
+ DLOG(WARNING) << "Frame format: " |
+ << media::VideoCaptureFormat::ToString(frame_format) |
+ << " requires at least " << frame_format.ImageAllocationSize() |
+ << " bytes, but only " << length << " bytes was given."; |
mcasas
2016/09/27 14:36:01
Who is going to read this DLOG anyway? Code
in med
magjed_chromium
2016/09/27 15:19:56
I don't know if anyone will use it. We can remove
mcasas
2016/09/28 16:39:22
Yes, by all means, but probably you would revert
|
+ return; |
+ } |
if (external_jpeg_decoder_) { |
const VideoCaptureGpuJpegDecoder::STATUS status = |