camerad: ensure sync objects are assigned only on successful creation (#34731)

ensure sync objects are assigned only on successful creation
pull/34733/head
Dean Lee 2 months ago committed by GitHub
parent 1bd0d6577c
commit d9bc9be388
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 6
      system/camerad/cameras/spectra.cc

@ -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

Loading…
Cancel
Save