found bug in EventStream()... fixed...

Support and queries relating to all previous versions of ZoneMinder
Locked
reza
Posts: 21
Joined: Sat Jan 15, 2005 7:58 pm

found bug in EventStream()... fixed...

Post by reza »

in zm_event.cpp, if the duration is less than a full second, duration is set to zero..

int duration = atoi(dbrow[3]);

and then you get the floating point error here...

int base_fps = frames/duration;

I just set base_fps to 1 if duration is zero, however, you can also do floating point math for the computations to get the exact answer.

Reza
User avatar
zoneminder
Site Admin
Posts: 5215
Joined: Wed Jul 09, 2003 2:07 pm
Location: Bristol, UK
Contact:

Post by zoneminder »

Thanks for this. I think you just managed to get it in in time to be fixed in 1.20.0

Cheers

Phil
Locked