Commit a498dc94 authored by Jouni Paulus's avatar Jouni Paulus
Browse files

remove earlier FIX_1033_MEMORY_LEAK_OMASA solution and rename remaining...

remove earlier FIX_1033_MEMORY_LEAK_OMASA solution and rename remaining FIX_1033_MEMORY_LEAK_OMASA_BIS into FIX_1033_MEMORY_LEAK_OMASA.
allocate tdbin in OMASA.
parent 913c2834
Loading
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -157,8 +157,7 @@
/*#define SPLIT_REND_WITH_HEAD_ROT  */                  /* Dlb,FhG: Split Rendering contributions 21 and 35 */

#define FIX_1027_GSC_INT_OVERFLOW                       /* VA: issue 2207: overflow in GSC */
//#define FIX_1033_MEMORY_LEAK_OMASA                      /* Nokia / Orange: issue 1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */
#define FIX_1033_MEMORY_LEAK_OMASA_BIS                  /* Nokia / Second solution Orange: issue 1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */
#define FIX_1033_MEMORY_LEAK_OMASA                      /* Nokia / Orange: issue #1033: Memory leak in OMASA to BINAURAL with HRTF with bitrate switching */

/* #################### End BE switches ################################## */

+0 −2
Original line number Diff line number Diff line
@@ -272,9 +272,7 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
            {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#ifndef FIX_1033_MEMORY_LEAK_OMASA
                st_ivas->hHrtfTD = NULL;
#endif

                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
+2 −4
Original line number Diff line number Diff line
@@ -1210,15 +1210,13 @@ static ivas_error ivas_mc_dec_reconfig(

            if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) )
            {
#ifdef FIX_1033_MEMORY_LEAK_OMASA_BIS
#ifdef FIX_1033_MEMORY_LEAK_OMASA
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
#endif
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#ifndef FIX_1033_MEMORY_LEAK_OMASA
                    st_ivas->hHrtfTD = NULL;
#endif
#ifdef FIX_1033_MEMORY_LEAK_OMASA_BIS
#ifdef FIX_1033_MEMORY_LEAK_OMASA
                }
#endif
            }
+12 −8
Original line number Diff line number Diff line
@@ -378,11 +378,17 @@ ivas_error ivas_omasa_dec_config(
            if ( st_ivas->ism_mode == ISM_MASA_MODE_DISC )
            {
                /* Allocate TD renderer for the objects in DISC mode */
#ifdef FIX_1033_MEMORY_LEAK_OMASA
                if ( st_ivas->hBinRendererTd == NULL )
                {
#endif
                    if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }

#ifdef FIX_1033_MEMORY_LEAK_OMASA
                }
#endif
                /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */
                if ( ( error = ivas_omasa_separate_object_renderer_open( st_ivas ) ) != IVAS_ERR_OK )
                {
@@ -391,16 +397,14 @@ ivas_error ivas_omasa_dec_config(
            }
            else
            {
#ifdef FIX_1033_MEMORY_LEAK_OMASA_BIS
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
#ifdef FIX_1033_MEMORY_LEAK_OMASA
                if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
#endif
                    /* TD renderer handle */
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#ifndef FIX_1033_MEMORY_LEAK_OMASA
                    st_ivas->hHrtfTD = NULL;
#endif
#ifdef FIX_1033_MEMORY_LEAK_OMASA_BIS
#ifdef FIX_1033_MEMORY_LEAK_OMASA
                }
#endif
                /* ISM renderer handle + ISM data handle */
+0 −2
Original line number Diff line number Diff line
@@ -526,9 +526,7 @@ ivas_error ivas_sba_dec_reconfigure(
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#ifndef FIX_1033_MEMORY_LEAK_OMASA
                    st_ivas->hHrtfTD = NULL;
#endif
                }
            }
            nchan_transport_old += st_ivas->nchan_ism;