Merge pull request #825 from rwg0/688-fix-fast-forward

Fix fast forward/reverse in event playback (#688)
This commit is contained in:
Andrew Bauer 2015-05-09 19:39:23 -05:00
commit 5ded77f8de
1 changed files with 4 additions and 2 deletions

View File

@ -1428,8 +1428,10 @@ void EventStream::runStream()
if ( ((curr_frame_id-1)%frame_mod) == 0 )
{
delta_us = (unsigned int)(frame_data->delta * 1000000);
if ( effective_fps < base_fps )
delta_us = (unsigned int)((delta_us * base_fps)/effective_fps);
// if effective > base we should speed up frame delivery
delta_us = (unsigned int)((delta_us * base_fps)/effective_fps);
// but must not exceed maxfps
delta_us = max(delta_us, 1000000 / maxfps);
send_frame = true;
}
}