Fixed nextKeyTime() function

This commit is contained in:
Thulinma 2021-01-21 23:13:43 +01:00
parent 98e4ca6997
commit 926c5108b4

View file

@ -496,6 +496,7 @@ namespace Mist{
if (!keys.getValidCount()){return 0;} if (!keys.getValidCount()){return 0;}
//Get the key for the current time //Get the key for the current time
size_t keyNum = keys.getNumForTime(lastPacketTime); size_t keyNum = keys.getNumForTime(lastPacketTime);
if (keys.getEndValid() <= keyNum+1){return 0;}
//Return the next key //Return the next key
return keys.getTime(keyNum+1); return keys.getTime(keyNum+1);
} }
@ -1225,7 +1226,7 @@ namespace Mist{
if (!sought){initialSeek();} if (!sought){initialSeek();}
if (prepareNext()){ if (prepareNext()){
if (thisPacket){ if (thisPacket){
lastPacketTime = thisPacket.getTime(); lastPacketTime = thisTime;
if (firstPacketTime == 0xFFFFFFFFFFFFFFFFull){firstPacketTime = lastPacketTime;} if (firstPacketTime == 0xFFFFFFFFFFFFFFFFull){firstPacketTime = lastPacketTime;}
// slow down processing, if real time speed is wanted // slow down processing, if real time speed is wanted