From 422ee01cd6e33631a71622baa96e62e7d9de0586 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Thu, 5 Oct 2023 15:34:52 +0200 Subject: [PATCH 1/2] fix for preventing existing EFAP memories being reallocated --- lib_dec/ivas_ism_renderer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 7730465fc2..5229ee709d 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -68,7 +68,7 @@ ivas_error ivas_ism_renderer_open( return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM renderer\n" ) ); } - if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL ) + if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL && st_ivas->hEFAPdata == NULL ) { if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) { -- GitLab From 3047121735904b5ee4decb19123ffef1d6a3db02 Mon Sep 17 00:00:00 2001 From: Eleni Fotopoulou Date: Thu, 5 Oct 2023 17:04:43 +0200 Subject: [PATCH 2/2] wrap fix under define --- lib_com/options.h | 4 ++-- lib_dec/ivas_ism_renderer.c | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index f11b257869..1dd07efbce 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,7 +165,7 @@ /* #################### End BE switches ################################## */ - +#define BE_FIX_832_ASAN_ERROR_EFAP_OSBA /* FhG: issue #832: fix ASAN error caused by re-allocating EFAP memories in OSBA*/ /* #################### Start NON-BE switches ############################ */ /* any switch which is non-be wrt selection floating point code */ @@ -180,7 +180,7 @@ #define NONBE_FIX_846_JBM_MASA_SIDSTART /* FhG: Issue #846: fix JBM for MASA DTX when the first frame is a SID frame */ #define NONBE_FIX_841_MC_RS_TDOBJ_RENDERER /* FhG: Issue #841: [Non-BE] Resolve "MC RS HRFT handle not set to NULL" */ #define NONBE_FIX_840_PARAMMC_RS /* FhG: Issue #840: Resolve "MC RS ParamMC hoa encoder wrongly set to zero" */ -#define NONBE_FIX_826_JBM_MASA_CNA_CNG /* FhG: issue #826: Resolve "JBM MASA: CNA and CNG not in sync with non-JBM decoding" */ +#define NONBE_FIX_826_JBM_MASA_CNA_CNG /* FhG: issue #826: Resolve "JBM MASA: CNA and CNG not in sync with non-JBM decoding" */ /* ##################### End NON-BE switches ########################### */ diff --git a/lib_dec/ivas_ism_renderer.c b/lib_dec/ivas_ism_renderer.c index 5229ee709d..33c5c7183a 100644 --- a/lib_dec/ivas_ism_renderer.c +++ b/lib_dec/ivas_ism_renderer.c @@ -67,8 +67,11 @@ ivas_error ivas_ism_renderer_open( { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for ISM renderer\n" ) ); } - +#ifdef BE_FIX_832_ASAN_ERROR_EFAP_OSBA if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL && st_ivas->hEFAPdata == NULL ) +#else + if ( st_ivas->hIntSetup.is_loudspeaker_setup && st_ivas->hIntSetup.ls_azimuth != NULL && st_ivas->hIntSetup.ls_elevation != NULL ) +#endif { if ( ( error = efap_init_data( &( st_ivas->hEFAPdata ), st_ivas->hIntSetup.ls_azimuth, st_ivas->hIntSetup.ls_elevation, st_ivas->hIntSetup.nchan_out_woLFE, EFAP_MODE_EFAP ) ) != IVAS_ERR_OK ) { -- GitLab