Index: media/capture/video/video_capture_buffer_pool_impl.h |
diff --git a/media/capture/video/video_capture_buffer_pool_impl.h b/media/capture/video/video_capture_buffer_pool_impl.h |
index b5073df7d742ce986effddcfb35ddfce42050e91..ab6cd518eb98330ba9783e47cd5e8bd1819b7cc3 100644 |
--- a/media/capture/video/video_capture_buffer_pool_impl.h |
+++ b/media/capture/video/video_capture_buffer_pool_impl.h |
@@ -27,6 +27,9 @@ |
namespace media { |
+// This implementation guarantees that, even when creating new instances, |
+// a previously used |buffer_id| is never reused without first cycling through |
+// the complete int range. |
class CAPTURE_EXPORT VideoCaptureBufferPoolImpl |
: public VideoCaptureBufferPool { |
public: |
@@ -73,7 +76,7 @@ class CAPTURE_EXPORT VideoCaptureBufferPoolImpl |
mutable base::Lock lock_; |
// The ID of the next buffer. |
- int next_buffer_id_; |
+ static int next_buffer_id_; |
// The ID of the buffer last relinquished by the producer (a candidate for |
// resurrection). |