mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-10 18:10:56 +09:00
LibAudio: Clear the MP3 bit stream when seeking
This commit is contained in:
parent
9bf9702842
commit
4ad9fbc6a5
Notes:
sideshowbarker
2024-07-17 03:03:15 +09:00
Author: https://github.com/timschumi
Commit: 4ad9fbc6a5
Pull-request: https://github.com/SerenityOS/serenity/pull/17067
Reviewed-by: https://github.com/gmta ✅
1 changed files with 2 additions and 0 deletions
|
@ -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 {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue