mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-10 13:00:29 +03:00
LibAudio: Only check subframe size if sample rate is constant
This commit is contained in:
parent
1bf81f84a0
commit
c776ebcaf6
Notes:
sideshowbarker
2024-07-17 09:47:09 +09:00
Author: https://github.com/kleinesfilmroellchen Commit: https://github.com/SerenityOS/serenity/commit/c776ebcaf6 Pull-request: https://github.com/SerenityOS/serenity/pull/20686 Reviewed-by: https://github.com/Hendiadyoin1
@ -460,7 +460,9 @@ LoaderSamples FlacLoaderPlugin::next_frame()
|
||||
auto& subframe_samples = m_subframe_buffers[i];
|
||||
subframe_samples.clear_with_capacity();
|
||||
TRY(parse_subframe(subframe_samples, new_subframe, bit_stream));
|
||||
VERIFY(subframe_samples.size() == m_current_frame->sample_count);
|
||||
// We only verify the sample count for the common case of a constant sample rate.
|
||||
if (m_sample_rate == m_current_frame->sample_rate)
|
||||
VERIFY(subframe_samples.size() == m_current_frame->sample_count);
|
||||
}
|
||||
|
||||
// 11.2. Overview ("The audio data is composed of...")
|
||||
|
Loading…
Reference in New Issue
Block a user