mirror of
https://github.com/xiph/opus.git
synced 2025-06-06 07:21:03 +00:00
Fix uninitialized field on custom mode malloc fail
This commit is contained in:
parent
4ad7d21081
commit
f1b088001e
1 changed files with 3 additions and 0 deletions
|
@ -173,7 +173,10 @@ static void compute_allocation_table(CELTMode *mode)
|
||||||
mode->nbAllocVectors = BITALLOC_SIZE;
|
mode->nbAllocVectors = BITALLOC_SIZE;
|
||||||
allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands));
|
allocVectors = opus_alloc(sizeof(unsigned char)*(BITALLOC_SIZE*mode->nbEBands));
|
||||||
if (allocVectors==NULL)
|
if (allocVectors==NULL)
|
||||||
|
{
|
||||||
|
mode->allocVectors = NULL;
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Check for standard mode */
|
/* Check for standard mode */
|
||||||
if (mode->Fs == 400*(opus_int32)mode->shortMdctSize)
|
if (mode->Fs == 400*(opus_int32)mode->shortMdctSize)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue