Commit 0abeaa55 authored by emerit's avatar emerit
Browse files

simplifying fix

parent 9be6e473
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -221,6 +221,7 @@

#define HYBRID_ITD_MAX                                 /* FhG: Improvement for DFT-stereo for cases with large ITDs */
#define FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR             /* Eri: Fix for issue 462: Use-of-uninitialized memory in external HRTF deallocation in decoder together with BR switching */
#define FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR_SIMPLIER             /* Ora: Fix for issue 462: Use-of-uninitialized memory in external HRTF deallocation in decoder together with BR switching */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+7 −1
Original line number Diff line number Diff line
@@ -193,7 +193,9 @@ static ivas_error ivas_ism_bitrate_switching(
            ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

            /* Open the TD Binaural renderer */
#ifdef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR
#if defined FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR && !defined( FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR_SIMPLIER )


            if ( st_ivas->hHrtfTD == NULL || st_ivas->hBinRendererTd == NULL )
            {
                if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
@@ -270,17 +272,21 @@ static ivas_error ivas_ism_bitrate_switching(

            /* Close the TD Binaural renderer */
#ifdef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR
#ifndef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR_SIMPLIER
            if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
            {
#endif
                if ( st_ivas->hBinRendererTd != NULL )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }

#ifndef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR_SIMPLIER
                if ( st_ivas->hHrtfTD != NULL )
                {
                    st_ivas->hHrtfTD = NULL;
                }
#endif
            }
#else
            if ( st_ivas->hBinRendererTd != NULL )