Fix fast forward/reverse in event playback not being fast if effectivefps < maxfps

pull/825/head
rwg0 2015-04-22 21:53:20 +01:00
parent d18ec50189
commit 422020a3b2
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 )
// 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;
}
}