Issue #3197 Improvement

pull/3198/head
SirLouen 2021-03-21 00:00:36 +01:00
parent 33f98a0d40
commit db7e9edcab
1 changed files with 4 additions and 5 deletions

View File

@ -1977,11 +1977,10 @@ bool Monitor::Analyse() {
if (event) {
Debug(2, "Have event %" PRIu64 " in mocord", event->Id());
if (section_length
&& ( ( timestamp->tv_sec - video_store_data->recording.tv_sec ) >= section_length )
&& ( ( ( (function == MOCORD) || (function == RECORD) ) && (event_close_mode != CLOSE_TIME)) || ! ( timestamp->tv_sec % section_length ) )
) {
if (section_length && ( ( timestamp->tv_sec - video_store_data->recording.tv_sec ) >= section_length )
&& ( ( (function == MOCORD) && (event_close_mode != CLOSE_TIME) ) || ( (function == RECORD) && (event_close_mode == CLOSE_TIME) )
|| ! ( timestamp->tv_sec % section_length ) ) )
{
Info("%s: %03d - Closing event %" PRIu64 ", section end forced %d - %d = %d >= %d",
name, image_count, event->Id(),
timestamp->tv_sec, video_store_data->recording.tv_sec,