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

Unified Diff: content/common/gpu/client/gpu_video_decode_accelerator_host.cc

Issue 1541353002: Add offset support to BitstreamBuffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address dcheng's comments Created 4 years, 11 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/common/gpu/client/gpu_video_decode_accelerator_host.cc
diff --git a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
index 19a336b9ca30af573159449f4eef9911b2b01b8d..3c4a4bd940a9cd72f5172e6875e575c5b975028a 100644
--- a/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
+++ b/content/common/gpu/client/gpu_video_decode_accelerator_host.cc
@@ -130,7 +130,8 @@ void GpuVideoDecodeAcceleratorHost::Decode(
AcceleratedVideoDecoderMsg_Decode_Params params;
params.bitstream_buffer_id = bitstream_buffer.id();
params.buffer_handle = handle;
- params.size = bitstream_buffer.size();
+ params.size = base::checked_cast<uint32_t>(bitstream_buffer.size());
+ params.offset = base::checked_cast<uint32_t>(bitstream_buffer.offset());
params.presentation_timestamp = bitstream_buffer.presentation_timestamp();
params.key_id = bitstream_buffer.key_id();
params.iv = bitstream_buffer.iv();

Powered by Google App Engine
This is Rietveld 408576698