diff --git a/src/zm_local_camera.cpp b/src/zm_local_camera.cpp index 3ff3608c0..0679a5c5e 100644 --- a/src/zm_local_camera.cpp +++ b/src/zm_local_camera.cpp @@ -705,6 +705,12 @@ LocalCamera::~LocalCamera() { } // end LocalCamera::~LocalCamera +int LocalCamera::Close() { + if (device_prime && capture) + Terminate(); + return 0; +}; + void LocalCamera::Initialise() { Debug(3, "Opening video device %s", device.c_str()); //if ( (vid_fd = open( device.c_str(), O_RDWR|O_NONBLOCK, 0 )) < 0 ) diff --git a/src/zm_local_camera.h b/src/zm_local_camera.h index 6c64e39d6..7bbb285ac 100644 --- a/src/zm_local_camera.h +++ b/src/zm_local_camera.h @@ -153,8 +153,7 @@ public: int PreCapture() override; int Capture(std::shared_ptr &p) override; int PostCapture() override; - int Close() override { return 0; }; - + int Close() override; static bool GetCurrentSettings(const char *device, char *output, int version, bool verbose); };