aboutsummaryrefslogtreecommitdiff
path: root/sound/vorbis.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2008-05-24 23:58:22 +0000
committerJohannes Schickel2008-05-24 23:58:22 +0000
commitff573ec1e214c233a530a96798c0b33738bd8467 (patch)
treec7aeaa7c88e5933af7e8c516c2a9256621c99ca1 /sound/vorbis.cpp
parentcff8ccccc92e28e6ffe861dafd55b007cc164be8 (diff)
downloadscummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.tar.gz
scummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.tar.bz2
scummvm-rg350-ff573ec1e214c233a530a96798c0b33738bd8467.zip
Instead of simply returning 0 for "infinite" looping in FLAC and OGG/Vorbis streams in getTotalPlayTime return kUnknownPlayTime.
svn-id: r32265
Diffstat (limited to 'sound/vorbis.cpp')
-rw-r--r--sound/vorbis.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/vorbis.cpp b/sound/vorbis.cpp
index 8c12acc6e9..64f67d2a13 100644
--- a/sound/vorbis.cpp
+++ b/sound/vorbis.cpp
@@ -120,6 +120,9 @@ public:
int getRate() const { return _rate; }
int32 getTotalPlayTime() const {
+ if (!_totalNumLoops)
+ return AudioStream::kUnknownPlayTime;
+
#ifdef USE_TREMOR
return (_endTime - _startTime) * _totalNumLoops;
#else