CameraBuf: avoid busy waiting on safe_queue (#20643)
* 20ms timeout * Update camera_common.cc Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com> old-commit-hash: e562a69a4d6e1669aebdc24386f170a5a27b5f95
This commit is contained in:
@@ -105,7 +105,7 @@ CameraBuf::~CameraBuf() {
|
||||
}
|
||||
|
||||
bool CameraBuf::acquire() {
|
||||
if (!safe_queue.try_pop(cur_buf_idx, 1)) return false;
|
||||
if (!safe_queue.try_pop(cur_buf_idx, 50)) return false;
|
||||
|
||||
if (camera_bufs_metadata[cur_buf_idx].frame_id == -1) {
|
||||
LOGE("no frame data? wtf");
|
||||
|
||||
Reference in New Issue
Block a user