Fixed skipahead playback timing
This commit is contained in:
parent
0870a91e12
commit
1bbc378458
1 changed files with 2 additions and 2 deletions
|
@ -1171,9 +1171,9 @@ namespace Mist{
|
||||||
// slow down processing, if real time speed is wanted
|
// slow down processing, if real time speed is wanted
|
||||||
if (realTime){
|
if (realTime){
|
||||||
uint8_t i = 6;
|
uint8_t i = 6;
|
||||||
while (--i && thisPacket.getTime() > ((((Util::bootMS() - firstTime) * 1000) + maxSkipAhead) / realTime) &&
|
while (--i && thisPacket.getTime() > (((Util::bootMS() - firstTime) * 1000) / realTime + maxSkipAhead) &&
|
||||||
keepGoing()){
|
keepGoing()){
|
||||||
uint64_t amount = thisPacket.getTime() - ((((Util::bootMS() - firstTime) * 1000) + maxSkipAhead) / realTime);
|
uint64_t amount = thisPacket.getTime() - (((Util::bootMS() - firstTime) * 1000) / realTime + maxSkipAhead);
|
||||||
if (amount > 1000){amount = 1000;}
|
if (amount > 1000){amount = 1000;}
|
||||||
Util::sleep(amount);
|
Util::sleep(amount);
|
||||||
//Make sure we stay responsive to requests and stats while waiting
|
//Make sure we stay responsive to requests and stats while waiting
|
||||||
|
|
Loading…
Add table
Reference in a new issue