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

Unified Diff: content/browser/renderer_host/media/video_capture_controller.cc

Issue 907113002: Reland:Refactored pixel format resize operations in media/video/capture into a function called Vide… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed size for VCC unittest. Created 5 years, 10 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 | content/browser/renderer_host/media/video_capture_controller_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/media/video_capture_controller.cc
diff --git a/content/browser/renderer_host/media/video_capture_controller.cc b/content/browser/renderer_host/media/video_capture_controller.cc
index bae4d44e7d97c4770e58524218d43ad2255e68e9..98da42f867cd95af77db675853810397d42597ca 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -495,6 +495,10 @@ void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
NOTREACHED();
}
+ // The input |length| can be greater than the required buffer size because of
+ // paddings and/or alignments, but it cannot be less.
+ DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize());
+
if (libyuv::ConvertToI420(data,
length,
yplane,
« no previous file with comments | « no previous file | content/browser/renderer_host/media/video_capture_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698