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

Unified Diff: media/capture/video/video_capture_device_client.cc

Issue 2369983003: Win video capture: Fix capture format and frame buffer mismatch (Closed)
Patch Set: Remove VideoCaptureDeviceWin |capture_format_| Created 4 years, 2 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: media/capture/video/video_capture_device_client.cc
diff --git a/media/capture/video/video_capture_device_client.cc b/media/capture/video/video_capture_device_client.cc
index 368af81f9ce73b41bba132c1f54cd4b23a8d0470..7ec12cf34fecf6bf8639708fc6ce23a77259689c 100644
--- a/media/capture/video/video_capture_device_client.cc
+++ b/media/capture/video/video_capture_device_client.cc
@@ -89,6 +89,9 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
base::TimeDelta timestamp) {
TRACE_EVENT0("video", "VideoCaptureDeviceClient::OnIncomingCapturedData");
DCHECK_EQ(media::PIXEL_STORAGE_CPU, frame_format.pixel_storage);
+ // The input |length| can be greater than the required buffer size because of
+ // paddings and/or alignments, but it cannot be smaller.
+ DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize());
if (last_captured_pixel_format_ != frame_format.pixel_format) {
OnLog("Pixel format: " +
@@ -215,10 +218,6 @@ void VideoCaptureDeviceClient::OnIncomingCapturedData(
NOTREACHED();
}
- // The input |length| can be greater than the required buffer size because of
- // paddings and/or alignments, but it cannot be smaller.
- DCHECK_GE(static_cast<size_t>(length), frame_format.ImageAllocationSize());
-
if (external_jpeg_decoder_) {
const VideoCaptureJpegDecoder::STATUS status =
external_jpeg_decoder_->GetStatus();
« no previous file with comments | « no previous file | media/capture/video/win/sink_filter_observer_win.h » ('j') | media/capture/video/win/sink_filter_observer_win.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698