Fix bug in Output::seek() when seeking to a timestamp that is between the last part of a key and the first part of the next key

This commit is contained in:
Thulinma 2021-02-02 01:20:23 +01:00
parent dd5ae98002
commit 4080d141f8
7 changed files with 44 additions and 26 deletions

View file

@ -394,7 +394,7 @@ namespace Mist{
tmpPos.seekTime = 0;
}
DTSC::Keys keys(M.keys(trackIdx));
uint32_t keyNum = keys.getNumForTime(ms);
uint32_t keyNum = M.getKeyNumForTime(trackIdx, ms);
if (keys.getTime(keyNum) > tmpPos.seekTime){
tmpPos.seekTime = keys.getTime(keyNum);
tmpPos.bytePos = keys.getBpos(keyNum);