From d4dbf19f6b0181ee78034bfe4caf189d1c016998 Mon Sep 17 00:00:00 2001
From: Boyuan Yang <byang@debian.org>
Date: Thu, 14 Jul 2022 15:56:57 -0400
Subject: New upstream version 0.18.0

---
 src/buffer_pool.cc | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

(limited to 'src/buffer_pool.cc')

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);
     }
-- 
cgit v1.2.3