aboutsummaryrefslogtreecommitdiff
path: root/src/buffer_pool.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer_pool.cc')
-rw-r--r--src/buffer_pool.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/src/buffer_pool.cc b/src/buffer_pool.cc
index c1a5606..582f13c 100644
--- a/src/buffer_pool.cc
+++ b/src/buffer_pool.cc
@@ -156,19 +156,15 @@ bool BufferPool::OnFrameBufferSizeChanged(int bitdepth,
}
RefCountedBufferPtr BufferPool::GetFreeBuffer() {
- // In frame parallel mode, the GetFreeBuffer() calls from ObuParser all happen
- // from the same thread serially, but the GetFreeBuffer() call in
- // DecoderImpl::ApplyFilmGrain can happen from multiple threads at the same
- // time. So this function has to be thread safe.
- // TODO(b/142583029): Investigate if the GetFreeBuffer() call in
- // DecoderImpl::ApplyFilmGrain() call can be serialized so that this function
- // need not be thread safe.
std::unique_lock<std::mutex> lock(mutex_);
for (auto buffer : buffers_) {
if (!buffer->in_use_) {
buffer->in_use_ = true;
buffer->progress_row_ = -1;
buffer->frame_state_ = kFrameStateUnknown;
+ buffer->hdr_cll_set_ = false;
+ buffer->hdr_mdcv_set_ = false;
+ buffer->itut_t35_set_ = false;
lock.unlock();
return RefCountedBufferPtr(buffer, RefCountedBuffer::ReturnToBufferPool);
}