diff --git a/flake.nix b/flake.nix index 02d3b16..a20c079 100644 --- a/flake.nix +++ b/flake.nix @@ -48,7 +48,7 @@ patchelf ]; - # for some reason, buildInputs performs some magic an converts them to build dependencies, not runtime dependencies + # for some reason, buildInputs performs some magic and converts them to build dependencies, not runtime dependencies # also, non static dependencies (?? how to ensure ??) dlopenBuildInputs = with pkgs; [ dbus diff --git a/src/frame_streams/sdl/sdl_video_frame_stream2.cpp b/src/frame_streams/sdl/sdl_video_frame_stream2.cpp index 68a9fff..44b7c62 100644 --- a/src/frame_streams/sdl/sdl_video_frame_stream2.cpp +++ b/src/frame_streams/sdl/sdl_video_frame_stream2.cpp @@ -23,6 +23,10 @@ SDLVideo2InputDevice::SDLVideo2InputDevice(const SDL_CameraID dev) : _dev(dev) { } SDLVideo2InputDevice::~SDLVideo2InputDevice(void) { + if (_thread.joinable()) { + assert(_ref == 0); + _thread.join(); + } } std::shared_ptr> SDLVideo2InputDevice::subscribe(void) {