properly join the video thread

This commit is contained in:
Green Sky 2025-03-08 16:02:23 +01:00
parent 03f2c904ce
commit b297c00c89
No known key found for this signature in database
GPG Key ID: DBE05085D874AB4A
2 changed files with 5 additions and 1 deletions

View File

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

View File

@ -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<FrameStream2I<SDLVideoFrame>> SDLVideo2InputDevice::subscribe(void) {