[Scummvm-cvs-logs] scummvm master -> d58f250918f742fd7fd035d7764433f492520e45
clone2727
clone2727 at gmail.com
Tue Jan 27 01:56:06 CET 2015
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:
d58f250918 AUDIO: Fix skipping samples when the skip length is greater than the first chunk
Commit: d58f250918f742fd7fd035d7764433f492520e45
https://github.com/scummvm/scummvm/commit/d58f250918f742fd7fd035d7764433f492520e45
Author: Matthew Hoops (clone2727 at gmail.com)
Date: 2015-01-26T19:54:32-05:00
Commit Message:
AUDIO: Fix skipping samples when the skip length is greater than the first chunk
Changed paths:
audio/decoders/quicktime.cpp
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 331c850..ff87e7a 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -241,6 +241,15 @@ void QuickTimeAudioDecoder::QuickTimeAudioTrack::queueAudio(const Timestamp &len
// If we have any samples that we need to skip (ie. we seeked into
// the middle of a chunk), skip them here.
if (_skipSamples != Timestamp()) {
+ if (_skipSamples > chunkLength) {
+ // If the amount we need to skip is greater than the size
+ // of the chunk, just skip it altogether.
+ _curMediaPos = _curMediaPos + chunkLength;
+ _skipSamples = _skipSamples - chunkLength;
+ delete stream;
+ continue;
+ }
+
skipSamples(_skipSamples, stream);
_curMediaPos = _curMediaPos + _skipSamples;
chunkLength = chunkLength - _skipSamples;
More information about the Scummvm-git-logs
mailing list