diff --git a/src/zm_event.cpp b/src/zm_event.cpp index 23d810e78..248cffdaa 100644 --- a/src/zm_event.cpp +++ b/src/zm_event.cpp @@ -27,7 +27,6 @@ #include #include #include -#include #include "zm.h" #include "zm_db.h" @@ -692,8 +691,8 @@ void Event::AddFrame(Image *image, struct timeval timestamp, int score, Image *a // The idea is to write out 1/sec frame_data.push(new Frame(id, frames, frame_type, timestamp, delta_time, score)); double fps = monitor->get_capture_fps(); - if ( write_to_db - or + if ( write_to_db + or (frame_data.size() >= MAX_DB_FRAMES) or (frame_type == BULK) diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index 005e8cdd6..a3cf383ca 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -16,7 +16,6 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include #include "zm_ffmpeg.h" #include "zm_image.h" diff --git a/src/zm_font.h b/src/zm_font.h index 4753129ff..2790ea4e1 100644 --- a/src/zm_font.h +++ b/src/zm_font.h @@ -1,7 +1,8 @@ #ifndef ZM_FONT_H #define ZM_FONT_H -#include +#include "zm_define.h" + #include #define NUM_FONT_SIZES 4 diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 5b448424e..224145ed8 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include "zm.h" #include "zm_db.h" diff --git a/src/zm_videostore.cpp b/src/zm_videostore.cpp index ea85af8d1..fc49ed60a 100644 --- a/src/zm_videostore.cpp +++ b/src/zm_videostore.cpp @@ -26,7 +26,6 @@ #include #include -#include extern "C" { #include "libavutil/time.h" diff --git a/src/zm_zone.cpp b/src/zm_zone.cpp index 047432f4e..a057684ae 100644 --- a/src/zm_zone.cpp +++ b/src/zm_zone.cpp @@ -18,7 +18,6 @@ // #define __STDC_FORMAT_MACROS 1 -#include #include "zm.h" #include "zm_db.h" #include "zm_zone.h" diff --git a/src/zms.cpp b/src/zms.cpp index 5f970cd1a..652b87350 100644 --- a/src/zms.cpp +++ b/src/zms.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include "zm.h" diff --git a/src/zmu.cpp b/src/zmu.cpp index 6fce000b3..dd14aacb8 100644 --- a/src/zmu.cpp +++ b/src/zmu.cpp @@ -87,7 +87,6 @@ Options for use with monitors: */ #include -#include #include "zm.h" #include "zm_db.h"