diff --git a/src/input/input_aac.cpp b/src/input/input_aac.cpp index 6cd13ca8..9a63a354 100644 --- a/src/input/input_aac.cpp +++ b/src/input/input_aac.cpp @@ -308,12 +308,12 @@ namespace Mist{ // @param trackID of the AAC track void inputAAC::seek(uint64_t seekTime, size_t 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 - inFile.seek(keys.getBpos(keyNum)-1); - timestamp = keys.getTime(keyNum); + inFile.seek(keys.getBpos(keyIdx)-1); + timestamp = keys.getTime(keyIdx); 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