Bug Fix: Fix minimp3 to deal with invalid files
Some checks are pending
Check if Cog buildable / Build Universal Cog.app (push) Waiting to run

If a file can't decode, there should not be a division by zero error.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
Christopher Snowhill 2025-03-24 15:42:30 -07:00
parent 18d3f76152
commit 2038a140ed

View file

@ -150,6 +150,9 @@ static int mp3_seek_callback(uint64_t position, void *user_data) {
if(samples && sample_ptr) {
samples_filled = samples / _decoder_info.channels;
memcpy(&_decoder_buffer_output[0], sample_ptr, sizeof(mp3d_sample_t) * samples);
} else {
inputEOF = YES;
return NO;
}
inputEOF = NO;
if(!_foundiTunSMPB) {