]> git.tdb.fi Git - libs/al.git/commitdiff
Seek back to beginning after reading signature
authorMikko Rasa <tdb@tdb.fi>
Thu, 5 Jul 2018 14:29:06 +0000 (17:29 +0300)
committerMikko Rasa <tdb@tdb.fi>
Thu, 5 Jul 2018 14:29:06 +0000 (17:29 +0300)
source/sounddecoder.cpp

index 38ae8fa15b77635e360ee50d313345eee6edb37b..e0a56d3a4fc1513d21e6b99eada7f26c262903db 100644 (file)
@@ -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);