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

Unified Diff: content/common/gpu/media/v4l2_image_processor.cc

Issue 1476523005: Verify returned frames from media::VideoFrame::Wrap*() methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: posciak@ 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
Index: content/common/gpu/media/v4l2_image_processor.cc
diff --git a/content/common/gpu/media/v4l2_image_processor.cc b/content/common/gpu/media/v4l2_image_processor.cc
index 2e500146ab8310fd8f927daedfbfa81f4aefbc68..f0cf397777480b9453f5135a5cdc0f52f2d19bea 100644
--- a/content/common/gpu/media/v4l2_image_processor.cc
+++ b/content/common/gpu/media/v4l2_image_processor.cc
@@ -561,6 +561,10 @@ void V4L2ImageProcessor::Dequeue() {
output_visible_size_,
output_record.fds,
job_record->frame->timestamp());
+ if (!output_frame) {
+ NOTIFY_ERROR();
+ return;
+ }
output_frame->AddDestructionObserver(media::BindToCurrentLoop(
base::Bind(&V4L2ImageProcessor::ReuseOutputBuffer,
device_weak_factory_.GetWeakPtr(),

Powered by Google App Engine
This is Rietveld 408576698