Loading apps/decoder.c +10 −4 Original line number Diff line number Diff line Loading @@ -4150,6 +4150,7 @@ static ivas_error load_hrtf_from_file( /*------------------------------------------------------------------------------------------* * Release HRTF binary data *------------------------------------------------------------------------------------------*/ #ifndef FIX_2249_MEMORY_LEAK_IN_SBA if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && binaural_renderer_sec != IVAS_BIN_RENDERER_TYPE_TDREND && hHrtfBinary->hHrtfTD != NULL ) { Loading Loading @@ -4279,7 +4280,9 @@ static ivas_error load_hrtf_from_file( } } } #ifndef FIX_2249_MEMORY_LEAK_IN_SBA } #endif #ifdef FIX_2249_MEMORY_LEAK_IN_SBA if ( ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) Loading Loading @@ -4319,6 +4322,9 @@ static ivas_error load_hrtf_from_file( } } } #ifdef FIX_2249_MEMORY_LEAK_IN_SBA } #endif return IVAS_ERR_OK; } Loading lib_dec/ivas_init_dec.c +5 −4 Original line number Diff line number Diff line Loading @@ -2989,6 +2989,10 @@ void ivas_destroy_dec( ivas_combined_orientation_close( &st_ivas->hCombinedOrientationData ); /* Time Domain binaural renderer handle */ #ifdef FIX_2249_MEMORY_LEAK_IN_SBA ivas_td_binaural_close( &st_ivas->hBinRendererTd ); ivas_HRTF_td_binary_close( &st_ivas->hHrtfTD ); #else if ( st_ivas->hBinRendererTd != NULL ) { ivas_td_binaural_close( &st_ivas->hBinRendererTd ); Loading @@ -2996,13 +3000,10 @@ void ivas_destroy_dec( if ( st_ivas->hHrtfTD != NULL ) { #ifdef FIX_2249_MEMORY_LEAK_IN_SBA ivas_HRTF_td_binary_close( &st_ivas->hHrtfTD ); #else BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); #endif } #endif /* CRend binaural renderer handle */ ivas_HRTF_CRend_binary_close( &st_ivas->hHrtfCrend ); Loading lib_rend/ivas_reverb.c +8 −2 Original line number Diff line number Diff line Loading @@ -139,11 +139,17 @@ ivas_error ivas_reverb_HRTF_statistics_open( const int32_t output_Fs /* i : output sampling rate */ ) { if ( *hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == TRUE ) if ( *hHrtfStatistics != NULL ) { if( ( *hHrtfStatistics )->fromROM == TRUE ) { return IVAS_ERROR( IVAS_ERR_INTERNAL, "HRTF statistics allocated but not initialized from binary file!\n" ); } /* HRTF statistics loaded from binary file */ return IVAS_ERR_OK; } if ( ( *hHrtfStatistics = (HRTFS_STATISTICS *) malloc( sizeof( HRTFS_STATISTICS ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for statistics HRTF tables!" ); Loading Loading
apps/decoder.c +10 −4 Original line number Diff line number Diff line Loading @@ -4150,6 +4150,7 @@ static ivas_error load_hrtf_from_file( /*------------------------------------------------------------------------------------------* * Release HRTF binary data *------------------------------------------------------------------------------------------*/ #ifndef FIX_2249_MEMORY_LEAK_IN_SBA if ( !( binaural_renderer == IVAS_BIN_RENDERER_TYPE_TDREND || binaural_renderer == IVAS_BIN_RENDERER_TYPE_DEFAULT ) && binaural_renderer_sec != IVAS_BIN_RENDERER_TYPE_TDREND && hHrtfBinary->hHrtfTD != NULL ) { Loading Loading @@ -4279,7 +4280,9 @@ static ivas_error load_hrtf_from_file( } } } #ifndef FIX_2249_MEMORY_LEAK_IN_SBA } #endif #ifdef FIX_2249_MEMORY_LEAK_IN_SBA if ( ( binaural_renderer == IVAS_BIN_RENDERER_TYPE_FASTCONV || binaural_renderer == IVAS_BIN_RENDERER_TYPE_CREND ) && OutputConfig == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB ) Loading Loading @@ -4319,6 +4322,9 @@ static ivas_error load_hrtf_from_file( } } } #ifdef FIX_2249_MEMORY_LEAK_IN_SBA } #endif return IVAS_ERR_OK; } Loading
lib_dec/ivas_init_dec.c +5 −4 Original line number Diff line number Diff line Loading @@ -2989,6 +2989,10 @@ void ivas_destroy_dec( ivas_combined_orientation_close( &st_ivas->hCombinedOrientationData ); /* Time Domain binaural renderer handle */ #ifdef FIX_2249_MEMORY_LEAK_IN_SBA ivas_td_binaural_close( &st_ivas->hBinRendererTd ); ivas_HRTF_td_binary_close( &st_ivas->hHrtfTD ); #else if ( st_ivas->hBinRendererTd != NULL ) { ivas_td_binaural_close( &st_ivas->hBinRendererTd ); Loading @@ -2996,13 +3000,10 @@ void ivas_destroy_dec( if ( st_ivas->hHrtfTD != NULL ) { #ifdef FIX_2249_MEMORY_LEAK_IN_SBA ivas_HRTF_td_binary_close( &st_ivas->hHrtfTD ); #else BSplineModelEvalDealloc( &st_ivas->hHrtfTD->ModelParams, &st_ivas->hHrtfTD->ModelEval ); ivas_HRTF_binary_close( &st_ivas->hHrtfTD ); #endif } #endif /* CRend binaural renderer handle */ ivas_HRTF_CRend_binary_close( &st_ivas->hHrtfCrend ); Loading
lib_rend/ivas_reverb.c +8 −2 Original line number Diff line number Diff line Loading @@ -139,11 +139,17 @@ ivas_error ivas_reverb_HRTF_statistics_open( const int32_t output_Fs /* i : output sampling rate */ ) { if ( *hHrtfStatistics != NULL && ( *hHrtfStatistics )->fromROM == TRUE ) if ( *hHrtfStatistics != NULL ) { if( ( *hHrtfStatistics )->fromROM == TRUE ) { return IVAS_ERROR( IVAS_ERR_INTERNAL, "HRTF statistics allocated but not initialized from binary file!\n" ); } /* HRTF statistics loaded from binary file */ return IVAS_ERR_OK; } if ( ( *hHrtfStatistics = (HRTFS_STATISTICS *) malloc( sizeof( HRTFS_STATISTICS ) ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for statistics HRTF tables!" ); Loading