From 926c5108b460c02ea34cf6605d38e0e4c18dc222 Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 21 Jan 2021 23:13:43 +0100 Subject: [PATCH] Fixed nextKeyTime() function --- src/output/output.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/output/output.cpp b/src/output/output.cpp index 74818b94..a06f26b9 100644 --- a/src/output/output.cpp +++ b/src/output/output.cpp @@ -496,6 +496,7 @@ namespace Mist{ if (!keys.getValidCount()){return 0;} //Get the key for the current time size_t keyNum = keys.getNumForTime(lastPacketTime); + if (keys.getEndValid() <= keyNum+1){return 0;} //Return the next key return keys.getTime(keyNum+1); } @@ -1225,7 +1226,7 @@ namespace Mist{ if (!sought){initialSeek();} if (prepareNext()){ if (thisPacket){ - lastPacketTime = thisPacket.getTime(); + lastPacketTime = thisTime; if (firstPacketTime == 0xFFFFFFFFFFFFFFFFull){firstPacketTime = lastPacketTime;} // slow down processing, if real time speed is wanted