Merge "Change log to match with function it's coming from" into sc-v2-dev
diff --git a/libs/gui/BLASTBufferQueue.cpp b/libs/gui/BLASTBufferQueue.cpp
index b2cab8c..39dd5d9 100644
--- a/libs/gui/BLASTBufferQueue.cpp
+++ b/libs/gui/BLASTBufferQueue.cpp
@@ -621,9 +621,15 @@
void BLASTBufferQueue::acquireAndReleaseBuffer() {
BufferItem bufferItem;
- mBufferItemConsumer->acquireBuffer(&bufferItem, 0 /* expectedPresent */, false);
- mBufferItemConsumer->releaseBuffer(bufferItem, Fence::NO_FENCE);
+ status_t status =
+ mBufferItemConsumer->acquireBuffer(&bufferItem, 0 /* expectedPresent */, false);
+ if (status != OK) {
+ BQA_LOGE("Failed to acquire a buffer in acquireAndReleaseBuffer, err=%s",
+ statusToString(status).c_str());
+ return;
+ }
mNumFrameAvailable--;
+ mBufferItemConsumer->releaseBuffer(bufferItem, bufferItem.mFence);
}
void BLASTBufferQueue::onFrameAvailable(const BufferItem& item) {