From baba438ce13538e681bede7b096aba44a8ae313a Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sat, 16 Feb 2019 11:49:28 -0500 Subject: [PATCH] use image_count when reporting earlier than fps_report_interval --- src/zm_monitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_monitor.cpp b/src/zm_monitor.cpp index 72d9c8c2a..b95f569f7 100644 --- a/src/zm_monitor.cpp +++ b/src/zm_monitor.cpp @@ -2481,7 +2481,7 @@ int Monitor::Capture() { // If we are too fast, we get div by zero. This seems to happen in the case of audio packets. if ( now != last_fps_time ) { // # of images per interval / the amount of time it took - double new_fps = double(fps_report_interval)/(now-last_fps_time); + double new_fps = double(image_count%fps_report_interval?image_count:fps_report_interval)/(now-last_fps_time); unsigned int new_camera_bytes = camera->Bytes(); unsigned int new_capture_bandwidth = (new_camera_bytes - last_camera_bytes)/(now-last_fps_time); last_camera_bytes = new_camera_bytes;