camerad: fix use of uninitialized `CameraInfo` in `camera_open()` (#30642)

This commit is contained in:
Dean Lee 2023-12-08 12:11:44 +08:00 committed by GitHub
parent 49317e3903
commit 9bff8ccd0f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -597,8 +597,6 @@ void CameraState::camera_init(MultiCameraState *s, VisionIpcServer * v, int came
request_id_last = 0;
skipped = true;
camera_set_parameters();
buf.init(device_id, ctx, this, v, FRAME_BUF_COUNT, yuv_type);
camera_map_bufs(s);
}
@ -634,6 +632,8 @@ void CameraState::camera_open(MultiCameraState *multi_cam_state_, int camera_num
return;
}
camera_set_parameters();
// create session
struct cam_req_mgr_session_info session_info = {};
ret = do_cam_control(multi_cam_state->video0_fd, CAM_REQ_MGR_CREATE_SESSION, &session_info, sizeof(session_info));