From f0091af6b514938be8778d4c6943b18c81b3d50a Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 3 Oct 2012 10:44:57 -0400 Subject: [PATCH] AUDIO: Don't allow skipping negative times in skipSamples() --- audio/decoders/quicktime.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/audio/decoders/quicktime.cpp b/audio/decoders/quicktime.cpp index 35210eb0202..0588650ec6f 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())