camerad: make sure cl_context is valid for lifetime of camerad (#25735)

old-commit-hash: 8ae3199578
taco
Dean Lee 3 years ago committed by GitHub
parent b546a476cc
commit f7b83d6f02
  1. 2
      system/camerad/cameras/camera_common.cc

@ -336,6 +336,7 @@ void camerad_thread() {
cl_context context = CL_CHECK_ERR(clCreateContext(NULL, 1, &device_id, NULL, NULL, &err));
#endif
{
MultiCameraState cameras = {};
VisionIpcServer vipc_server("camerad", device_id, context);
@ -345,6 +346,7 @@ void camerad_thread() {
vipc_server.start_listener();
cameras_run(&cameras);
}
CL_CHECK(clReleaseContext(context));
}

Loading…
Cancel
Save