CameraBuf: avoid busy waiting on safe_queue (#20643)
* 20ms timeout * Update camera_common.cc Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>albatross
parent
f98049a0ef
commit
e562a69a4d
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue