Index: webrtc/common_video/include/i420_buffer_pool.h |
diff --git a/webrtc/common_video/include/i420_buffer_pool.h b/webrtc/common_video/include/i420_buffer_pool.h |
index 5ab1510689b265b086be62df19bea4d71c925004..5ea7abdf67903701960b13526cc8de6bb9617673 100644 |
--- a/webrtc/common_video/include/i420_buffer_pool.h |
+++ b/webrtc/common_video/include/i420_buffer_pool.h |
@@ -25,7 +25,9 @@ namespace webrtc { |
// changes, old buffers will be purged from the pool. |
class I420BufferPool { |
public: |
- I420BufferPool(); |
+ I420BufferPool() : I420BufferPool(false) {} |
+ explicit I420BufferPool(bool zero_initialize); |
+ |
// Returns a buffer from the pool, or creates a new buffer if no suitable |
// buffer exists in the pool. |
rtc::scoped_refptr<VideoFrameBuffer> CreateBuffer(int width, int height); |
@@ -36,6 +38,10 @@ class I420BufferPool { |
private: |
rtc::ThreadChecker thread_checker_; |
std::list<rtc::scoped_refptr<I420Buffer>> buffers_; |
+ // If true, newly allocated buffers are zero-initialized. Note that recycled |
+ // buffers are not zero'd before reuse. (This is required of buffers used by |
stefan-webrtc
2016/02/01 14:02:08
Maybe mention why rezeroing isn't needed?
hbos
2016/02/02 16:13:03
Done.
|
+ // FFmpeg according to http://crbug.com/390941). |
+ bool zero_initialize_; |
}; |
} // namespace webrtc |