summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
authorTim Schumacher <timschumi@gmx.de>2023-01-17 22:02:24 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-01-19 11:42:32 +0100
commit4ad9fbc6a54dc00bc975ee23429da50cac6b6edf (patch)
tree2efa09b34c4cecb4f25ebfed1722c508493223c7 /Userland
parent9bf97028422bfd68c3624f0b4fff9b5ea2090e09 (diff)
downloadserenity-4ad9fbc6a54dc00bc975ee23429da50cac6b6edf.zip
LibAudio: Clear the MP3 bit stream when seeking
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibAudio/MP3Loader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibAudio/MP3Loader.cpp b/Userland/Libraries/LibAudio/MP3Loader.cpp
index 22b4c0a225..f1082663fc 100644
--- a/Userland/Libraries/LibAudio/MP3Loader.cpp
+++ b/Userland/Libraries/LibAudio/MP3Loader.cpp
@@ -68,6 +68,7 @@ MaybeLoaderError MP3LoaderPlugin::reset()
m_synthesis_buffer = {};
m_loaded_samples = 0;
m_bit_reservoir.discard_or_error(m_bit_reservoir.size());
+ m_bitstream->align_to_byte_boundary();
return {};
}
@@ -86,6 +87,7 @@ MaybeLoaderError MP3LoaderPlugin::seek(int const position)
m_bit_reservoir.discard_or_error(m_bit_reservoir.size());
m_bit_reservoir.handle_any_error();
m_is_first_frame = true;
+ m_bitstream->align_to_byte_boundary();
return {};
}