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

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

Issue 1179323002: Video Capture: extract storage info from pixel format in VideoCaptureFormat. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: second round of comments from hubbe@. Rebase Created 5 years, 6 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 05636438f151b3fe0827ba6b64f9b6077ffc5e2b..41ccb69f1e981a0cfef4b7d440b1347ecba39129 100644
--- a/content/browser/renderer_host/media/video_capture_controller.cc
+++ b/content/browser/renderer_host/media/video_capture_controller.cc
@@ -328,7 +328,9 @@ void VideoCaptureController::DoIncomingCapturedVideoFrameOnIOThread(
client->controller_id, buffer_id, frame->mailbox_holder(0),
frame->coded_size(), timestamp, copy_of_metadata.Pass());
} else if (frame->format() == media::VideoFrame::I420) {
- bool is_new_buffer = client->known_buffers.insert(buffer_id).second;
+ DCHECK(frame->IsMappable());
+ const bool is_new_buffer =
+ client->known_buffers.insert(buffer_id).second;
if (is_new_buffer) {
// On the first use of a buffer on a client, share the memory handle.
size_t memory_size = 0;

Powered by Google App Engine
This is Rietveld 408576698