Commit 58c74948 authored by norvell's avatar norvell Committed by emerit
Browse files

Remove reset of st_ivas->hHrtfTD to allow proper dealloc. Fix TD renderer use in non-ISM formats

parent ae0a1a6b
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -276,7 +276,6 @@ static ivas_error ivas_ism_bitrate_switching_dec(
            /* Close the TD Binaural renderer */
#ifdef FIX_1045_ISM_BITRATE_SWITCHING
            ivas_td_binaural_close( &st_ivas->hBinRendererTd );
            st_ivas->hHrtfTD = NULL;

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

            if ( st_ivas->hBinRendererTd != NULL && ( st_ivas->renderer_type != RENDERER_BINAURAL_OBJECTS_TD ) )
            {
#ifdef FIX_1045_ISM_BITRATE_SWITCHING
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#else
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
            }

#ifdef SPLIT_REND_WITH_HEAD_ROT
+8 −0
Original line number Diff line number Diff line
@@ -426,12 +426,20 @@ ivas_error ivas_omasa_dec_config(
            }
            else
            {
#ifdef FIX_1045_ISM_BITRATE_SWITCHING
                if ( st_ivas->hBinRendererTd != NULL  )
                {
                    /* TD renderer handle */
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }
#else
                if ( st_ivas->hBinRendererTd != NULL && st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    /* TD renderer handle */
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
                /* ISM renderer handle + ISM data handle */
                ivas_omasa_separate_object_renderer_close( st_ivas );
            }
+4 −0
Original line number Diff line number Diff line
@@ -532,11 +532,15 @@ ivas_error ivas_sba_dec_reconfigure(
            /* Time Domain binaural renderer handle */
            if ( st_ivas->hBinRendererTd != NULL )
            {
#ifdef FIX_1045_ISM_BITRATE_SWITCHING
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
#else
                if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                    st_ivas->hHrtfTD = NULL;
                }
#endif
            }
            nchan_transport_old += st_ivas->nchan_ism;
            st_ivas->ism_mode = ISM_MODE_NONE;