aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Hoops2012-10-03 10:44:57 -0400
committerMatthew Hoops2012-10-03 10:45:43 -0400
commitf0091af6b514938be8778d4c6943b18c81b3d50a (patch)
tree3ddc44286d4a6ef1c853e805f243dc8c11a5e0a8
parentb50f5a4cde4b6e3549d0c0139b52079c092d0529 (diff)
downloadscummvm-rg350-f0091af6b514938be8778d4c6943b18c81b3d50a.tar.gz
scummvm-rg350-f0091af6b514938be8778d4c6943b18c81b3d50a.tar.bz2
scummvm-rg350-f0091af6b514938be8778d4c6943b18c81b3d50a.zip
AUDIO: Don't allow skipping negative times in skipSamples()
-rw-r--r--audio/decoders/quicktime.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp
index 35210eb020..0588650ec6 100644
--- a/audio/decoders/quicktime.cpp
+++ b/audio/decoders/quicktime.cpp
@@ -395,9 +395,9 @@ AudioStream *QuickTimeAudioDecoder::QuickTimeAudioTrack::readAudioChunk(uint chu
}
void QuickTimeAudioDecoder::QuickTimeAudioTrack::skipSamples(const Timestamp &length, AudioStream *stream) {
- uint32 sampleCount = length.convertToFramerate(getRate()).totalNumberOfFrames();
+ int32 sampleCount = length.convertToFramerate(getRate()).totalNumberOfFrames();
- if (sampleCount == 0)
+ if (sampleCount <= 0)
return;
if (isStereo())