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

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: Rebase. Created 4 years, 11 months 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 28a5f6744c6b835986f477e62fc082c6f61e27eb..b4d142e99ff55fc9c212cef78623cc83d3e42b83 100644
--- a/content/browser/renderer_host/media/video_capture_device_client.cc
+++ b/content/browser/renderer_host/media/video_capture_device_client.cc
@@ -368,7 +368,8 @@ void VideoCaptureDeviceClient::OnIncomingCapturedBuffer(
base::SharedMemory::NULLHandle(), 0u, base::TimeDelta());
break;
}
- DCHECK(frame.get());
+ if (!frame)
+ return;
frame->metadata()->SetDouble(media::VideoFrameMetadata::FRAME_RATE,
frame_format.frame_rate);
OnIncomingCapturedVideoFrame(std::move(buffer), frame, timestamp);

Powered by Google App Engine
This is Rietveld 408576698