don't cast fps to an int... values like 2.038 become 1.

This commit is contained in:
Isaac Connor 2020-07-23 16:08:57 -04:00
parent e3a2099ca8
commit 4f3b6a063e
1 changed files with 3 additions and 3 deletions

View File

@ -657,9 +657,9 @@ void Event::AddFrame(Image *image, struct timeval timestamp, int score, Image *a
// The idea is to write out 1/sec // The idea is to write out 1/sec
frame_data.push(new Frame(id, frames, frame_type, timestamp, delta_time, score)); frame_data.push(new Frame(id, frames, frame_type, timestamp, delta_time, score));
if ( write_to_db || ( monitor->get_fps() && (frame_data.size() > (unsigned int)monitor->get_fps())) ) { if ( write_to_db || ( monitor->get_fps() && (frame_data.size() > monitor->get_fps())) ) {
Debug(1, "Adding %d frames to DB because write_to_db:%d or frames > fps %d", Debug(1, "Adding %d frames to DB because write_to_db:%d or frames > analysis fps %f",
frame_data.size(), write_to_db, (unsigned int)monitor->get_fps()); frame_data.size(), write_to_db, monitor->get_fps());
WriteDbFrames(); WriteDbFrames();
last_db_frame = frames; last_db_frame = frames;
Debug(1, "Adding %d frames to DB, done", frame_data.size()); Debug(1, "Adding %d frames to DB, done", frame_data.size());