Skip to content

Commit a7047f3

Browse files
committed
Fix compile without libcamera. Closes #1951
1 parent f5c39a3 commit a7047f3

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

src/libcam.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -813,6 +813,7 @@ int cls_libcam::libcam_start()
813813

814814
void cls_libcam::libcam_stop()
815815
{
816+
mydelete(convert);
816817
mydelete(params);
817818

818819
if (started_aqr) {
@@ -981,9 +982,9 @@ int cls_libcam::next(ctx_image_data *img_data)
981982
cls_libcam::cls_libcam(cls_camera *p_cam)
982983
{
983984
cam = p_cam;
984-
convert = nullptr;
985985
#ifdef HAVE_LIBCAM
986986
MOTION_LOG(NTC, TYPE_VIDEO, NO_ERRNO,_("Opening libcam"));
987+
convert = nullptr;
987988
params = nullptr;
988989
reconnect_count = 0;
989990
cam->watchdog = cam->cfg->watchdog_tmo * 3; /* 3 is arbitrary multiplier to give startup more time*/
@@ -1004,7 +1005,7 @@ cls_libcam::~cls_libcam()
10041005
#ifdef HAVE_LIBCAM
10051006
libcam_stop();
10061007
#endif
1007-
mydelete(convert);
1008+
10081009
cam->device_status = STATUS_CLOSED;
10091010
}
10101011

src/libcam.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
public:
8787
cls_libcam(cls_camera *p_cam);
8888
~cls_libcam();
89+
void parms_update();
8990
int next(ctx_image_data *img_data);
9091
void noimage();
9192
private:

0 commit comments

Comments
 (0)