aboutsummaryrefslogtreecommitdiff
path: root/sound/decoders/vorbis.cpp
diff options
context:
space:
mode:
authorJohannes Schickel2010-01-27 08:08:33 +0000
committerJohannes Schickel2010-01-27 08:08:33 +0000
commit812603e29eef2bd0c224a9b3b4c2bf29b2d3b653 (patch)
tree63cb6f484d6ebaad723b589b2d99300bc452ed6b /sound/decoders/vorbis.cpp
parent9f2a619c06851429e261264c7f4b18a75cd4d7fd (diff)
downloadscummvm-rg350-812603e29eef2bd0c224a9b3b4c2bf29b2d3b653.tar.gz
scummvm-rg350-812603e29eef2bd0c224a9b3b4c2bf29b2d3b653.tar.bz2
scummvm-rg350-812603e29eef2bd0c224a9b3b4c2bf29b2d3b653.zip
Fix invalid sample position on Timestamp to sample conversion for Stereo streams.
svn-id: r47591
Diffstat (limited to 'sound/decoders/vorbis.cpp')
-rw-r--r--sound/decoders/vorbis.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/decoders/vorbis.cpp b/sound/decoders/vorbis.cpp
index 46a94a6214..f5ebc112c3 100644
--- a/sound/decoders/vorbis.cpp
+++ b/sound/decoders/vorbis.cpp
@@ -169,7 +169,7 @@ int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) {
}
bool VorbisInputStream::seek(const Timestamp &where) {
- int res = ov_pcm_seek(&_ovFile, calculateSampleOffset(where, getRate()));
+ int res = ov_pcm_seek(&_ovFile, convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames());
if (res) {
warning("Error seeking in Vorbis stream (%d)", res);
_pos = _bufferEnd;