Bug Fix: Fix minimp3 to deal with invalid files
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:
parent
2c4ca7d51d
commit
f73cde09ee
1 changed files with 3 additions and 0 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue