mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:17:44 +00:00
LibAudio: Only check subframe size if sample rate is constant
This commit is contained in:
parent
1bf81f84a0
commit
c776ebcaf6
1 changed files with 3 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue