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

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

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: cff149b4 WIP Created 7 years, 4 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 7bae69772bd90db83c2f5a196a0fa717cb6c4dc8..8b75b5029502c34eaaf855d040369950ccdd9c06 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -568,8 +568,11 @@ void VideoCaptureController::DoFrameInfoOnIOThread() {
return;
scoped_refptr<VideoCaptureBufferPool> buffer_pool =
- new VideoCaptureBufferPool(frame_info_.width * frame_info_.height * 3 / 2,
- kNoOfBuffers);
+ new VideoCaptureBufferPool(
+ media::VideoFrame::AllocationSize(
+ media::VideoFrame::I420,
+ gfx::Size(frame_info_.width, frame_info_.height)),
+ kNoOfBuffers);
// Check whether all buffers were created successfully.
if (!buffer_pool->Allocate()) {

Powered by Google App Engine
This is Rietveld 408576698