Only get ref image if we are doing motion detection.

This commit is contained in:
Isaac Connor 2020-12-27 11:55:14 -05:00
parent 48d9b4d5a5
commit 9b916a15a2
1 changed files with 5 additions and 3 deletions

View File

@ -22,9 +22,11 @@ int AnalysisThread::run() {
Debug(2, "after UpdateAdaptiveSkip"); Debug(2, "after UpdateAdaptiveSkip");
last_analysis_update_time = time(0); last_analysis_update_time = time(0);
if ( monitor->GetFunction() == Monitor::MODECT or monitor->GetFunction() == Monitor::MOCORD ) {
Debug(2, "THREAD: Getting ref image"); Debug(2, "THREAD: Getting ref image");
monitor->get_ref_image(); monitor->get_ref_image();
Debug(2, "THREAD: after Getting ref image"); Debug(2, "THREAD: after Getting ref image");
}
while ( !(terminate or zm_terminate) ) { while ( !(terminate or zm_terminate) ) {
// Process the next image // Process the next image