diff options
-rw-r--r-- | sound/decoders/vorbis.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sound/decoders/vorbis.cpp b/sound/decoders/vorbis.cpp index f5ebc112c3..5899eaa1fd 100644 --- a/sound/decoders/vorbis.cpp +++ b/sound/decoders/vorbis.cpp @@ -169,7 +169,9 @@ int VorbisInputStream::readBuffer(int16 *buffer, const int numSamples) { } bool VorbisInputStream::seek(const Timestamp &where) { - int res = ov_pcm_seek(&_ovFile, convertTimeToStreamPos(where, getRate(), isStereo()).totalNumberOfFrames()); + // Vorbisfile uses the sample pair number, thus we always use "false" for the isStereo parameter + // of the convertTimeToStreamPos helper. + int res = ov_pcm_seek(&_ovFile, convertTimeToStreamPos(where, getRate(), false).totalNumberOfFrames()); if (res) { warning("Error seeking in Vorbis stream (%d)", res); _pos = _bufferEnd; |