From 2f23f81ff3bfeb2627066ef5a015ac08ce01637f Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 8 Dec 2017 21:28:30 -0500 Subject: [PATCH] store a snaphost when we don't storae anything else as opposed to when specifically storing a snpashot --- src/zm_event.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 94bdc852f..8cedced4a 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -390,7 +390,7 @@ void Event::AddFramesInternal( int n_frames, int start_frame, Image **images, st static char event_file[PATH_MAX]; snprintf( event_file, sizeof(event_file), staticConfig.capture_file_format, path, frames ); - if ( monitor->GetOptSaveJPEGs() & 4 ) { + if ( ! ( monitor->GetOptSaveJPEGs() & 3 ) ) { //If this is the first frame, we should add a thumbnail to the event directory // ICON: We are working through the pre-event frames so this snapshot won't // neccessarily be of the motion. But some events are less than 10 frames, @@ -457,7 +457,8 @@ void Event::AddFrame( Image *image, struct timeval timestamp, int score, Image * static char event_file[PATH_MAX]; snprintf( event_file, sizeof(event_file), staticConfig.capture_file_format, path, frames ); - if ( monitor->GetOptSaveJPEGs() & 4 ) { + if ( ! ( monitor->GetOptSaveJPEGs() & 3 ) ) { + //if ( monitor->GetOptSaveJPEGs() & 4 ) { // Only snapshots //If this is the first frame, we should add a thumbnail to the event directory if ( frames == 10 || frames == 1 ) {