diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index d056eb2e4..59f11daaf 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -89,7 +89,7 @@ std::string load_monitor_sql = "`SectionLength`, `MinSectionLength`, `FrameSkip`, `MotionFrameSkip`, " "`FPSReportInterval`, `RefBlendPerc`, `AlarmRefBlendPerc`, `TrackMotion`, `Exif`," "`RTSPServer`, `RTSPStreamName`," -"`SignalCheckPoints`, `SignalCheckColour`, `Importance`-2 FROM `Monitors`"; +"`SignalCheckPoints`, `SignalCheckColour`, `Importance`-1 FROM `Monitors`"; std::string CameraType_Strings[] = { "Local", @@ -445,7 +445,7 @@ Monitor::Monitor() "SectionLength, MinSectionLength, FrameSkip, MotionFrameSkip, " "FPSReportInterval, RefBlendPerc, AlarmRefBlendPerc, TrackMotion, Exif," "`RTSPServer`,`RTSPStreamName`, - "SignalCheckPoints, SignalCheckColour, Importance-2 FROM Monitors"; + "SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) { @@ -595,7 +595,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) { rtsp_server = (*dbrow[col] != '0'); col++; rtsp_streamname = dbrow[col]; col++; - /*"SignalCheckPoints, SignalCheckColour, Importance-2 FROM Monitors"; */ + /*"SignalCheckPoints, SignalCheckColour, Importance-1 FROM Monitors"; */ signal_check_points = atoi(dbrow[col]); col++; signal_check_colour = strtol(dbrow[col][0] == '#' ? dbrow[col]+1 : dbrow[col], 0, 16); col++; @@ -607,6 +607,7 @@ void Monitor::Load(MYSQL_ROW dbrow, bool load_zones=true, Purpose p = QUERY) { grayscale_val = signal_check_colour & 0xff; /* Clear all bytes but lowest byte */ importance = dbrow[col] ? atoi(dbrow[col]) : 0;// col++; + if (importance < 0) importance = 0; // Should only be >= 0 // How many frames we need to have before we start analysing ready_count = std::max(warmup_count, pre_event_count);