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

Unified Diff: media/base/video_frame_pool.cc

Issue 2360373002: Fix a fuzzer crash in VideoFramePool (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/video_frame_pool.cc
diff --git a/media/base/video_frame_pool.cc b/media/base/video_frame_pool.cc
index 2bc7ff6a47e4f0f8402f479fef46c49a1e101fda..e117251187436bd4cd271830b607f9f857e15757 100644
--- a/media/base/video_frame_pool.cc
+++ b/media/base/video_frame_pool.cc
@@ -82,7 +82,11 @@ scoped_refptr<VideoFrame> VideoFramePool::PoolImpl::CreateFrame(
if (!frame.get()) {
frame = VideoFrame::CreateZeroInitializedFrame(
format, coded_size, visible_rect, natural_size, timestamp);
- LOG_IF(ERROR, !frame.get()) << "Failed to create a video frame";
+ // This can happen if the arguments are not valid.
+ if (!frame) {
+ LOG(ERROR) << "Failed to create a video frame";
+ return nullptr;
+ }
}
scoped_refptr<VideoFrame> wrapped_frame = VideoFrame::WrapVideoFrame(
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698