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

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

Issue 897483002: Refactored pixel format resize operations in media/video/capture into a function called VideoCaptu… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleaned emacs buffers. 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
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 8ff97bdf767d93c8821ef401ec33b229dfc31348..9e4ad42143cebeca9ae378e4e7be3db206a7a44f 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -469,6 +469,10 @@ void VideoCaptureController::VideoCaptureDeviceClient::OnIncomingCapturedData(
NOTREACHED();
}
+ // Given length can be greater than the required buffer size when paddings are
mcasas 2015/02/04 23:02:39 s/when paddings are applied or alignments are chan
+ // applied or alignments are changed, 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 | media/video/capture/file_video_capture_device.h » ('j') | media/video/capture/video_capture_types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698