From c87ae209f6664244e5e15991fc53ebdc16b6cfd8 Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Thu, 7 May 2026 13:16:59 +0200 Subject: [PATCH] [fix] set mem_hp20_out to NULL at init --- lib_com/options.h | 2 +- lib_dec/ivas_init_dec_fx.c | 9 +++------ 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index 5390fd919..1e23c1a8b 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -104,7 +104,7 @@ #define FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Dolby: remove unused ISAR */ #define FIX_BASOP_2560_STEREO_DFT_DEC_RESET /* FhG: BASOP issue 2560: align reset of hStereoDft->res_gains_ind_fx[][] between BASOP and float */ #define HARMONIZE_2539_cng_energy /* FhG: basop issue 2539: harmonize cng_energy with its ivas derivate */ -#define FIX_1585_ASAN_FORMAT_SW_ALT /* VA: float issue 1585: alternative fix memory leaks with format switching */ +#define FIX_1585_ASAN_FORMAT_SW_ALT /* VA,FhG: float issues 1585,1593: alternative fix memory leaks with format switching */ #define FIX_BASOP_2573_RF_MODE_UPDATE /* FhG: BASOP issue 2573: remove duplicated update of rf_mode parameters from evs_enc_fx(); was already done in updt_enc_common_fx() */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index fd440677b..b203370c8 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -2765,12 +2765,6 @@ ivas_error ivas_init_decoder_fx( set32_fx( st_ivas->mem_hp20_out_fx[i], 0, L_HP20_MEM + 2 ); } -#ifdef FIX_1585_ASAN_FORMAT_SW_ALT - FOR( ; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) - { - st_ivas->mem_hp20_out_fx[i] = NULL; - } -#endif /*-------------------------------------------------------------------* * Allocate and initialize rendering handles @@ -3467,6 +3461,9 @@ void ivas_initialize_handles_dec( FOR( i = 0; i < MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS; i++ ) { st_ivas->p_output_fx[i] = NULL; +#ifdef FIX_1585_ASAN_FORMAT_SW_ALT + st_ivas->mem_hp20_out_fx[i] = NULL; +#endif } return; -- GitLab