decoder/mad: add assert()

This commit is contained in:
Max Kellermann 2023-01-17 18:53:15 +01:00
parent 3cacb56bb7
commit b3897df682

View File

@ -798,6 +798,8 @@ MadDecoder::UpdateTimerNextFrame() noexcept
DecoderCommand
MadDecoder::SubmitPCM(size_t i, size_t pcm_length) noexcept
{
assert(i <= pcm_length);
size_t num_samples = pcm_length - i;
mad_fixed_to_24_buffer(output_buffer, synth.pcm,