stb_vorbis: avoid NaN due to uninitialized variable
This commit is contained in:
parent
543ad0c112
commit
b79c8458d3
@ -30,6 +30,7 @@
|
||||
// Tom Beaumont Ingo Leitgeb Nicolas Guillemot
|
||||
// Phillip Bennefall Rohit Thiago Goulart
|
||||
// manxorist@github saga musix github:infatum
|
||||
// Timur Gagiev
|
||||
//
|
||||
// Partial history:
|
||||
// 1.14 - 2018/xx/xx - delete bogus dealloca usage
|
||||
@ -4054,6 +4055,7 @@ static int start_decoder(vorb *f)
|
||||
f->previous_window[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2);
|
||||
f->finalY[i] = (int16 *) setup_malloc(f, sizeof(int16) * longest_floorlist);
|
||||
if (f->channel_buffers[i] == NULL || f->previous_window[i] == NULL || f->finalY[i] == NULL) return error(f, VORBIS_outofmem);
|
||||
memset(f->channel_buffers[i], 0, sizeof(float) * f->blocksize_1);
|
||||
#ifdef STB_VORBIS_NO_DEFER_FLOOR
|
||||
f->floor_buffers[i] = (float *) setup_malloc(f, sizeof(float) * f->blocksize_1/2);
|
||||
if (f->floor_buffers[i] == NULL) return error(f, VORBIS_outofmem);
|
||||
|
Loading…
Reference in New Issue
Block a user