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.
Bug: 235330851
Change-Id: I8f0a9adace5f53fe7f47179b425bb899abcec64f
Merged-In: I8f0a9adace5f53fe7f47179b425bb899abcec64f
diff --git a/media/codec2/hal/client/client.cpp b/media/codec2/hal/client/client.cpp
index eb3b936..076a4cc 100644
--- a/media/codec2/hal/client/client.cpp
+++ b/media/codec2/hal/client/client.cpp
@@ -1719,6 +1719,8 @@
static_cast<uint64_t>(blockPoolId),
bqId == 0 ? nullHgbp : igbp);
+ mOutputBufferQueue->expireOldWaiters();
+
if (!transStatus.isOk()) {
LOG(ERROR) << "setOutputSurface -- transaction failed.";
return C2_TRANSACTION_FAILED;
@@ -1764,6 +1766,7 @@
<< status << ".";
}
}
+ mOutputBufferQueue->expireOldWaiters();
}
c2_status_t Codec2Client::Component::connectToInputSurface(