mirror of
https://github.com/firestar5683/StarPilot.git
synced 2026-06-28 01:52:06 +08:00
camerad: ensure sync objects are assigned only on successful creation (#34731)
ensure sync objects are assigned only on successful creation
This commit is contained in:
@@ -956,15 +956,17 @@ bool SpectraCamera::enqueue_buffer(int i, uint64_t request_id) {
|
||||
ret = do_sync_control(m->cam_sync_fd, CAM_SYNC_CREATE, &sync_create, sizeof(sync_create));
|
||||
if (ret != 0) {
|
||||
LOGE("failed to create fence: %d %d", ret, sync_create.sync_obj);
|
||||
} else {
|
||||
sync_objs_ife[i] = sync_create.sync_obj;
|
||||
}
|
||||
sync_objs_ife[i] = sync_create.sync_obj;
|
||||
|
||||
if (icp_dev_handle > 0) {
|
||||
ret = do_cam_control(m->cam_sync_fd, CAM_SYNC_CREATE, &sync_create, sizeof(sync_create));
|
||||
if (ret != 0) {
|
||||
LOGE("failed to create fence: %d %d", ret, sync_create.sync_obj);
|
||||
} else {
|
||||
sync_objs_bps[i] = sync_create.sync_obj;
|
||||
}
|
||||
sync_objs_bps[i] = sync_create.sync_obj;
|
||||
}
|
||||
|
||||
// schedule request with camera request manager
|
||||
|
||||
Reference in New Issue
Block a user