[Scummvm-cvs-logs] scummvm master -> d2bf7f99fd20fbc0b6126e5c8ae6833d3491d030
clone2727
clone2727 at gmail.com
Fri Aug 15 02:18:44 CEST 2014
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d2bf7f99fd AUDIO: Really fix seeking with audio edits
Commit: d2bf7f99fd20fbc0b6126e5c8ae6833d3491d030
https://github.com/scummvm/scummvm/commit/d2bf7f99fd20fbc0b6126e5c8ae6833d3491d030
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2014-08-14T20:16:14-04:00
Commit Message:
AUDIO: Really fix seeking with audio edits
I really have no idea what I was thinking in acb127c2
Changed paths:
audio/decoders/quicktime.cpp
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 547abd2..331c850 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -414,8 +414,15 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::skipSamples(const Timestamp &le
}
void QuickTimeAudioDecoder::QuickTimeAudioTrack::findEdit(const Timestamp &position) {
- for (_curEdit = 0; _curEdit < _parentTrack->editCount - 1 && position > Timestamp(0, _parentTrack->editList[_curEdit].timeOffset, _decoder->_timeScale); _curEdit++)
- ;
+ // Go through the edits look for where we find out we need to be. As long
+ // as the position is >= to the edit's start time, it is considered to be in that
+ // edit. seek() already figured out if we reached the last edit, so we don't need
+ // to handle that case here.
+ for (_curEdit = 0; _curEdit < _parentTrack->editCount - 1; _curEdit++) {
+ Timestamp nextEditTime(0, _parentTrack->editList[_curEdit + 1].timeOffset, _decoder->_timeScale);
+ if (position < nextEditTime)
+ break;
+ }
enterNewEdit(position);
}
More information about the Scummvm-git-logs
mailing list