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

Unified Diff: content/renderer/media/video_capture_impl.cc

Issue 1476523005: Verify returned frames from media::VideoFrame::Wrap*() methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: halliwell@ comments. 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
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/video_capture_impl.cc
diff --git a/content/renderer/media/video_capture_impl.cc b/content/renderer/media/video_capture_impl.cc
index aa06bd7222a63767433c50912ae1a8c8bd928937..8e50ede0063a8041bb7c5d9b60d4ef2ffc6ac061 100644
--- a/content/renderer/media/video_capture_impl.cc
+++ b/content/renderer/media/video_capture_impl.cc
@@ -374,7 +374,11 @@ void VideoCaptureImpl::OnBufferReceived(
NOTREACHED();
break;
}
- DCHECK(frame);
+ if (!frame) {
+ Send(new VideoCaptureHostMsg_BufferReady(device_id_, buffer_id,
+ gpu::SyncToken(), -1.0));
+ return;
+ }
frame->metadata()->SetTimeTicks(media::VideoFrameMetadata::REFERENCE_TIME,
timestamp);
« no previous file with comments | « content/renderer/media/rtc_video_decoder.cc ('k') | content/renderer/media/video_track_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698