mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Camera: fix unknown bufId issue
It's legit to have bufId 0 in processCaptureResult with HAL buffer manager, but not for returnStreamBuffers. Test: the failed test can now pass Bug: 135565913 Change-Id: I05947bc159bb9ba00a670b98d4622f685b4ac760
This commit is contained in:
@@ -1233,7 +1233,14 @@ bool CameraHidlTest::DeviceCb::processCaptureResultLocked(const CaptureResult& r
|
||||
}
|
||||
|
||||
if (mUseHalBufManager) {
|
||||
returnStreamBuffers(results.outputBuffers);
|
||||
// Don't return buffers of bufId 0 (empty buffer)
|
||||
std::vector<StreamBuffer> buffers;
|
||||
for (const auto& sb : results.outputBuffers) {
|
||||
if (sb.bufferId != 0) {
|
||||
buffers.push_back(sb);
|
||||
}
|
||||
}
|
||||
returnStreamBuffers(buffers);
|
||||
}
|
||||
return notify;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user