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

Unified Diff: media/filters/gpu_video_decoder.cc

Issue 11961051: Merge 176816 (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1364/src/
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 | « media/filters/gpu_video_decoder.h ('k') | ppapi/api/dev/pp_video_dev.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/gpu_video_decoder.cc
===================================================================
--- media/filters/gpu_video_decoder.cc (revision 177492)
+++ media/filters/gpu_video_decoder.cc (working copy)
@@ -285,7 +285,9 @@
SHMBuffer* shm_buffer = GetSHM(size);
memcpy(shm_buffer->shm->memory(), buffer->GetData(), size);
BitstreamBuffer bitstream_buffer(
- next_bitstream_buffer_id_++, shm_buffer->shm->handle(), size);
+ next_bitstream_buffer_id_, shm_buffer->shm->handle(), size);
+ // Mask against 30 bits, to avoid (undefined) wraparound on signed integer.
+ next_bitstream_buffer_id_ = (next_bitstream_buffer_id_ + 1) & 0x3FFFFFFF;
bool inserted = bitstream_buffers_in_decoder_.insert(std::make_pair(
bitstream_buffer.id(), BufferPair(shm_buffer, buffer))).second;
DCHECK(inserted);
« no previous file with comments | « media/filters/gpu_video_decoder.h ('k') | ppapi/api/dev/pp_video_dev.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698