Compile fix for AAC input

This commit is contained in:
Thulinma 2022-06-16 16:48:11 +02:00
parent e961d71c16
commit 2cd990888f

View file

@ -308,12 +308,12 @@ namespace Mist{
// @param <idx> trackID of the AAC track // @param <idx> trackID of the AAC track
void inputAAC::seek(uint64_t seekTime, size_t idx){ void inputAAC::seek(uint64_t seekTime, size_t idx){
DTSC::Keys keys(M.keys(idx)); DTSC::Keys keys(M.keys(idx));
uint32_t keyNum = keys.getNumForTime(seekTime); uint32_t keyIdx = M.getKeyIndexForTime(idx, seekTime);
// We minus the filePos by one, since we init it 1 higher // We minus the filePos by one, since we init it 1 higher
inFile.seek(keys.getBpos(keyNum)-1); inFile.seek(keys.getBpos(keyIdx)-1);
timestamp = keys.getTime(keyNum); timestamp = keys.getTime(keyIdx);
DONTEVEN_MSG("inputAAC wants to seek to timestamp %li on track %li", seekTime, idx); DONTEVEN_MSG("inputAAC wants to seek to timestamp %li on track %li", seekTime, idx);
DONTEVEN_MSG("inputAAC seeked to timestamp %f with bytePos %li", timestamp, keys.getBpos(keyNum)-1); DONTEVEN_MSG("inputAAC seeked to timestamp %f with bytePos %li", timestamp, keys.getBpos(keyIdx)-1);
} }
}// namespace Mist }// namespace Mist