diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 6678b56b6..1aba5c183 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1523,7 +1523,7 @@ bool Monitor::Analyse() #endif // ZM_PLUGINS_ON { Event::StringSet zoneSet; - int motion_score = last_motion_score; + unsigned int motion_score = last_motion_score; bool alarm = false; if ( !(image_count % (motion_frame_skip+1) ) ) { @@ -3578,7 +3578,7 @@ unsigned int Monitor::DetectBlack(const Image &comp_image, Event::StringSet &zon unsigned int Monitor::DetectMotion( const Image &comp_image, Event::StringSet &zoneSet, unsigned int &score ) { bool alarm = false; - unsigned int score = 0; + score = 0; if ( n_zones <= 0 ) return( alarm ); diff --git a/src/zm_monitor.h b/src/zm_monitor.h index 2f74b696f..53b501c9a 100644 --- a/src/zm_monitor.h +++ b/src/zm_monitor.h @@ -419,7 +419,7 @@ public: return( camera->PostCapture() ); } - unsigned int DetectMotion( const Image &comp_image, Event::StringSet &zoneSet ); + unsigned int DetectMotion( const Image &comp_image, Event::StringSet &zoneSet, unsigned int &score ); // DetectBlack seems to be unused. Check it on zm_monitor.cpp for more info. //unsigned int DetectBlack( const Image &comp_image, Event::StringSet &zoneSet ); bool CheckSignal( const Image *image );