| 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 f6f8cba1aa5ae165026c78a387bfb3508d2f8dc9..cd39c5fa750dc48da1fc151b6c00d2f4b628e120 100644
|
| --- a/content/browser/renderer_host/media/video_capture_device_client.cc
|
| +++ b/content/browser/renderer_host/media/video_capture_device_client.cc
|
| @@ -138,10 +138,14 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
|
| std::unique_ptr<Buffer> buffer(
|
| ReserveI420OutputBuffer(dimensions, output_pixel_storage, &y_plane_data,
|
| &u_plane_data, &v_plane_data));
|
| - if (!buffer.get()) {
|
| - DLOG(WARNING) << "Failed to reserve I420 output buffer.";
|
| +#if DCHECK_IS_ON()
|
| + dropped_frame_counter_ = buffer.get() ? 0 : dropped_frame_counter_ + 1;
|
| + if (dropped_frame_counter_ >= kMaxDroppedFrames)
|
| + OnError(FROM_HERE, "Too many frames dropped");
|
| +#endif
|
| + // Failed to reserve I420 output buffer, so drop the frame.
|
| + if (!buffer.get())
|
| return;
|
| - }
|
|
|
| const int yplane_stride = dimensions.width();
|
| const int uv_plane_stride = yplane_stride / 2;
|
|
|