diff options
Diffstat (limited to 'src/lib/xiph/OggVisitor.cxx')
-rw-r--r-- | src/lib/xiph/OggVisitor.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/lib/xiph/OggVisitor.cxx b/src/lib/xiph/OggVisitor.cxx index 14ac666a0..b975d8d17 100644 --- a/src/lib/xiph/OggVisitor.cxx +++ b/src/lib/xiph/OggVisitor.cxx @@ -20,6 +20,7 @@ #include "OggVisitor.hxx" #include <stdexcept> +#include <utility> void OggVisitor::EndStream() @@ -51,7 +52,13 @@ OggVisitor::ReadNextPage() inline void OggVisitor::HandlePacket(const ogg_packet &packet) { + const bool _post_seek = std::exchange(post_seek, false); + if (packet.b_o_s) { + if (_post_seek) + /* ignore the BOS packet after seeking */ + return; + EndStream(); has_stream = true; OnOggBeginning(packet); @@ -97,4 +104,6 @@ OggVisitor::PostSeek() /* find the next Ogg page and feed it into the stream */ sync.ExpectPageSeekIn(stream); + + post_seek = true; } |