Loading lib_util/render_config_reader.c +31 −32 Original line number Diff line number Diff line Loading @@ -1432,15 +1432,15 @@ static ivas_error RenderConfigReader_readBinary( /* Allocate memory for the frequency grids */ if ( nFG > 0 ) { if ( pRenderConfigReader->nFG > 0 ) { for ( n = 0; n < pRenderConfigReader->nFG; n++ ) { free( pRenderConfigReader->pFG[n].pFc ); } free( pRenderConfigReader->pFG ); } pRenderConfigReader->nFG = nFG; if ( ( pRenderConfigReader->pFG = (FrequencyGrid *) malloc( pRenderConfigReader->nFG * sizeof( FrequencyGrid ) ) ) == NULL ) { return IVAS_ERR_FAILED_ALLOC; Loading @@ -1450,7 +1450,6 @@ static ivas_error RenderConfigReader_readBinary( /* Initialize memory pointers to allow safe freeing ico errors */ pRenderConfigReader->pFG[n].pFc = NULL; } pRenderConfigReader->nFG = nFG; } /* Loop through the frequency grids read from the binary stream */ Loading Loading @@ -1617,8 +1616,6 @@ static ivas_error RenderConfigReader_readBinary( /* Allocate memory for the acoustic environments array */ if ( nAE > 0 ) { if ( pRenderConfigReader->nAE > 0 ) { for ( n = 0; n < pRenderConfigReader->nAE; n++ ) { Loading @@ -1633,13 +1630,13 @@ static ivas_error RenderConfigReader_readBinary( #endif } free( pRenderConfigReader->pAE ); } pRenderConfigReader->nAE = nAE; if ( ( pRenderConfigReader->pAE = (AcousticEnv *) malloc( pRenderConfigReader->nAE * sizeof( AcousticEnv ) ) ) == NULL ) { return IVAS_ERR_FAILED_ALLOC; } pRenderConfigReader->nAE = nAE; /* Initialize memory pointers to allow safe freeing ico errors */ for ( n = 0; n < nAE; n++ ) { Loading Loading @@ -2000,8 +1997,9 @@ ivas_error RenderConfigReader_read( #endif } free( pRenderConfigReader->pAE ); pRenderConfigReader->nAE = nAE; } /* Allocate memory for the acoustic environments array */ if ( ( pRenderConfigReader->pAE = (AcousticEnv *) malloc( pRenderConfigReader->nAE * sizeof( AcousticEnv ) ) ) == NULL ) { Loading @@ -2016,6 +2014,7 @@ ivas_error RenderConfigReader_read( pRenderConfigReader->pAE[acIdx].pEarlyReflections = NULL; #endif } } acIdx = 0; roomAcHasAcEnvCount = TRUE; } Loading Loading
lib_util/render_config_reader.c +31 −32 Original line number Diff line number Diff line Loading @@ -1432,15 +1432,15 @@ static ivas_error RenderConfigReader_readBinary( /* Allocate memory for the frequency grids */ if ( nFG > 0 ) { if ( pRenderConfigReader->nFG > 0 ) { for ( n = 0; n < pRenderConfigReader->nFG; n++ ) { free( pRenderConfigReader->pFG[n].pFc ); } free( pRenderConfigReader->pFG ); } pRenderConfigReader->nFG = nFG; if ( ( pRenderConfigReader->pFG = (FrequencyGrid *) malloc( pRenderConfigReader->nFG * sizeof( FrequencyGrid ) ) ) == NULL ) { return IVAS_ERR_FAILED_ALLOC; Loading @@ -1450,7 +1450,6 @@ static ivas_error RenderConfigReader_readBinary( /* Initialize memory pointers to allow safe freeing ico errors */ pRenderConfigReader->pFG[n].pFc = NULL; } pRenderConfigReader->nFG = nFG; } /* Loop through the frequency grids read from the binary stream */ Loading Loading @@ -1617,8 +1616,6 @@ static ivas_error RenderConfigReader_readBinary( /* Allocate memory for the acoustic environments array */ if ( nAE > 0 ) { if ( pRenderConfigReader->nAE > 0 ) { for ( n = 0; n < pRenderConfigReader->nAE; n++ ) { Loading @@ -1633,13 +1630,13 @@ static ivas_error RenderConfigReader_readBinary( #endif } free( pRenderConfigReader->pAE ); } pRenderConfigReader->nAE = nAE; if ( ( pRenderConfigReader->pAE = (AcousticEnv *) malloc( pRenderConfigReader->nAE * sizeof( AcousticEnv ) ) ) == NULL ) { return IVAS_ERR_FAILED_ALLOC; } pRenderConfigReader->nAE = nAE; /* Initialize memory pointers to allow safe freeing ico errors */ for ( n = 0; n < nAE; n++ ) { Loading Loading @@ -2000,8 +1997,9 @@ ivas_error RenderConfigReader_read( #endif } free( pRenderConfigReader->pAE ); pRenderConfigReader->nAE = nAE; } /* Allocate memory for the acoustic environments array */ if ( ( pRenderConfigReader->pAE = (AcousticEnv *) malloc( pRenderConfigReader->nAE * sizeof( AcousticEnv ) ) ) == NULL ) { Loading @@ -2016,6 +2014,7 @@ ivas_error RenderConfigReader_read( pRenderConfigReader->pAE[acIdx].pEarlyReflections = NULL; #endif } } acIdx = 0; roomAcHasAcEnvCount = TRUE; } Loading