C2BqPool: Expire waiters on Surface switching
Wake up and expire C2Fence waiters for the old Surface when the Surface
is switched to a new Surface.
This was merged before, but mistakenly reverted by a merge conflict
resolution.
Bug: 235330851
Change-Id: I8260fcb00a40c78863717b731a5593981aa1bf49
diff --git a/media/codec2/hal/client/client.cpp b/media/codec2/hal/client/client.cpp
index 9359e29..2fa088a 100644
--- a/media/codec2/hal/client/client.cpp
+++ b/media/codec2/hal/client/client.cpp
@@ -1562,6 +1562,8 @@
static_cast<uint64_t>(blockPoolId),
bqId == 0 ? nullHgbp : igbp);
+ mOutputBufferQueue->expireOldWaiters();
+
if (!transStatus.isOk()) {
LOG(ERROR) << "setOutputSurface -- transaction failed.";
return C2_TRANSACTION_FAILED;
@@ -1607,6 +1609,7 @@
<< status << ".";
}
}
+ mOutputBufferQueue->expireOldWaiters();
}
c2_status_t Codec2Client::Component::connectToInputSurface(