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( |