mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:17:36 +00:00
LibAudio: Clear the MP3 bit stream when seeking
This commit is contained in:
parent
9bf9702842
commit
4ad9fbc6a5
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