From f89881a5da184ee9dc50123b34d3a2016c5cc8d5 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Thu, 5 Jul 2018 17:29:06 +0300 Subject: [PATCH] Seek back to beginning after reading signature --- source/sounddecoder.cpp | 1 + 1 file changed, 1 insertion(+) 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); -- 2.45.2