diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index c3c9e755c..ea8f15edf 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -1503,7 +1503,7 @@ bool Monitor::Analyse() { if ( section_length && ( ( timestamp->tv_sec - video_store_data->recording.tv_sec ) >= section_length ) - && ( (event_close_mode != CLOSE_TIME) || ! ( timestamp->tv_sec % section_length ) ) + && ( (function == MOCORD && (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(),