Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(326)

Unified Diff: content/browser/renderer_host/media/video_capture_device_client.cc

Issue 1476523005: Verify returned frames from media::VideoFrame::Wrap*() methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 4b6c4b3947f57d8a2cd188ee3223c6eb4eb6676d..24e634b7564dbcc6e1475ea7078fc1a28c8d0865 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -367,7 +367,10 @@ void VideoCaptureDeviceClient::OnIncomingCapturedBuffer(
base::SharedMemory::NULLHandle(), 0u, base::TimeDelta());
break;
}
- DCHECK(frame.get());
+ if (!frame) {
+ DLOG(ERROR) << "Couldn't create video frame";
+ return;
+ }
frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE,
frame_format.frame_rate);
OnIncomingCapturedVideoFrame(buffer.Pass(), frame, timestamp);

Powered by Google App Engine
This is Rietveld 408576698