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

Unified Diff: chromecast/renderer/media/hole_frame_factory.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: chromecast/renderer/media/hole_frame_factory.cc
diff --git a/chromecast/renderer/media/hole_frame_factory.cc b/chromecast/renderer/media/hole_frame_factory.cc
index c4f26e6c8402454751165e90ce244f6907ccee00..0dda172a4c84c5348686143955f0760e4d4dcd8c 100644
--- a/chromecast/renderer/media/hole_frame_factory.cc
+++ b/chromecast/renderer/media/hole_frame_factory.cc
@@ -64,6 +64,8 @@ scoped_refptr<::media::VideoFrame> HoleFrameFactory::CreateHoleFrame(
gfx::Rect(size), // visible rect
size, // natural size
base::TimeDelta()); // timestamp
+ if (!frame)
+ return nullptr;
frame->metadata()->SetBoolean(::media::VideoFrameMetadata::ALLOW_OVERLAY,
true);
return frame;

Powered by Google App Engine
This is Rietveld 408576698