aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMax Horn2003-08-04 16:28:41 +0000
committerMax Horn2003-08-04 16:28:41 +0000
commit996d4f1391f84328e1928d43d9fe08aadbae7893 (patch)
tree11eb69950800c8f8cbefee46493039aa184e4ff2 /sound
parentb46aaa690184d1092b4553f668cafc9ab99c9218 (diff)
downloadscummvm-rg350-996d4f1391f84328e1928d43d9fe08aadbae7893.tar.gz
scummvm-rg350-996d4f1391f84328e1928d43d9fe08aadbae7893.tar.bz2
scummvm-rg350-996d4f1391f84328e1928d43d9fe08aadbae7893.zip
fixed EOF handling of MP3 streams (subtract time from duration timer, instead of adding it...)
svn-id: r9464
Diffstat (limited to 'sound')
-rw-r--r--sound/audiostream.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/audiostream.cpp b/sound/audiostream.cpp
index d7da5c1c52..dd2bbaf781 100644
--- a/sound/audiostream.cpp
+++ b/sound/audiostream.cpp
@@ -289,8 +289,8 @@ void MP3InputStream::refill() {
// Subtract the duration of this frame from the time left to play
mad_timer_t frame_duration = _frame.header.duration;
mad_timer_negate(&frame_duration);
- mad_timer_add(&_duration, _frame.header.duration);
-
+ mad_timer_add(&_duration, frame_duration);
+
if (mad_timer_compare(_duration, mad_timer_zero) <= 0)
_size = -1; // Mark for EOF