From: Mikko Rasa Date: Thu, 5 Jul 2018 14:29:06 +0000 (+0300) Subject: Seek back to beginning after reading signature X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=f89881a5da184ee9dc50123b34d3a2016c5cc8d5;p=libs%2Fal.git Seek back to beginning after reading signature --- diff --git a/source/sounddecoder.cpp b/source/sounddecoder.cpp index 38ae8fa..e0a56d3 100644 --- a/source/sounddecoder.cpp +++ b/source/sounddecoder.cpp @@ -40,6 +40,7 @@ SoundDecoder *SoundDecoder::open_io(IO::Seekable &io) { char sig_buf[8]; io.read(sig_buf, sizeof(sig_buf)); + io.seek(0, IO::S_BEG); string signature(sig_buf, sizeof(sig_buf)); if(OggDecoder::detect(signature)) return new OggDecoder(io);