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

Unified Diff: media/capture/content/thread_safe_capture_oracle.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 | « media/base/video_frame.cc ('k') | media/cast/test/fake_media_source.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/capture/content/thread_safe_capture_oracle.cc
diff --git a/media/capture/content/thread_safe_capture_oracle.cc b/media/capture/content/thread_safe_capture_oracle.cc
index a99a99a16b17ca711e2762683bd17c386194a718..f3ba5a428de864e26e721086452ed9869aa929fe 100644
--- a/media/capture/content/thread_safe_capture_oracle.cc
+++ b/media/capture/content/thread_safe_capture_oracle.cc
@@ -122,7 +122,8 @@ bool ThreadSafeCaptureOracle::ObserveEventAndDecideCapture(
static_cast<uint8_t*>(output_buffer->data()),
output_buffer->mapped_size(), base::SharedMemory::NULLHandle(), 0u,
base::TimeDelta());
- DCHECK(*storage);
+ if (!(*storage))
+ return false;
*callback =
base::Bind(&ThreadSafeCaptureOracle::DidCaptureFrame, this, frame_number,
base::Passed(&output_buffer), capture_begin_time,
« no previous file with comments | « media/base/video_frame.cc ('k') | media/cast/test/fake_media_source.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698