aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMax Horn2004-01-18 20:57:45 +0000
committerMax Horn2004-01-18 20:57:45 +0000
commitaa0ad9b491362f06ee2f09318a9f0003d8ca4d2a (patch)
treee243e059c69eb0e3020aada02d203ba93cd124e6
parentc5f9a566da191daed888fd99ccc97c06a9a36582 (diff)
downloadscummvm-rg350-aa0ad9b491362f06ee2f09318a9f0003d8ca4d2a.tar.gz
scummvm-rg350-aa0ad9b491362f06ee2f09318a9f0003d8ca4d2a.tar.bz2
scummvm-rg350-aa0ad9b491362f06ee2f09318a9f0003d8ca4d2a.zip
Patch #878883: Fix for Ogg Vorbis playback
svn-id: r12503
-rw-r--r--sound/vorbis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 99600f8747..3267080502 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -229,7 +229,7 @@ inline bool VorbisInputStream::eosIntern() const {
int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
int samples = 0;
while (samples < numSamples && !eosIntern()) {
- const int len = MIN(numSamples, samples + (int)(_bufferEnd - _pos));
+ const int len = MIN(numSamples - samples, (int)(_bufferEnd - _pos));
memcpy(buffer, _pos, len * 2);
buffer += len;
_pos += len;