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

Unified Diff: content/common/gpu/media/video_decode_accelerator_unittest.cc

Issue 11826064: Enforce non-negative BitstreamBuffer id (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/media/video_decode_accelerator_unittest.cc
diff --git a/content/common/gpu/media/video_decode_accelerator_unittest.cc b/content/common/gpu/media/video_decode_accelerator_unittest.cc
index f325b40c8fcd317f72648a9fc05fdf9285775246..047365c47dbda662f58c75337130ebcd5e3d7442 100644
--- a/content/common/gpu/media/video_decode_accelerator_unittest.cc
+++ b/content/common/gpu/media/video_decode_accelerator_unittest.cc
@@ -603,7 +603,8 @@ void GLRenderingVDAClient::DecodeNextFragments() {
base::SharedMemoryHandle dup_handle;
CHECK(shm.ShareToProcess(base::Process::Current().handle(), &dup_handle));
media::BitstreamBuffer bitstream_buffer(
- next_bitstream_buffer_id_++, dup_handle, next_fragment_size);
+ next_bitstream_buffer_id_, dup_handle, next_fragment_size);
+ next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x7FFFFFFF;
Ami GONE FROM CHROMIUM 2013/01/10 23:13:56 This is kind of silly (since this is a unittest wi
sheu 2013/01/10 23:34:48 Fine. :-)
decoder_->Decode(bitstream_buffer);
++outstanding_decodes_;
encoded_data_next_pos_to_decode_ = end_pos;
« no previous file with comments | « content/common/gpu/media/gpu_video_decode_accelerator.cc ('k') | media/filters/gpu_video_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698