Set init var

This commit is contained in:
capitalistspz 2025-05-17 21:47:31 +01:00
parent d00222be11
commit 307af1297b

View file

@ -93,9 +93,11 @@ namespace CameraManager
std::scoped_lock lock(s_mutex); std::scoped_lock lock(s_mutex);
if (s_initialized) if (s_initialized)
return; return;
s_initialized = true;
s_mutex.unlock(); s_mutex.unlock();
s_running = true; s_running = true;
s_captureThread = std::thread(&CaptureWorker); s_captureThread = std::thread(&CaptureWorker);
s_ctx = Cap_createContext(); s_ctx = Cap_createContext();
const auto uniqueId = GetConfig().camera_id.GetValue(); const auto uniqueId = GetConfig().camera_id.GetValue();