Commit 17d9cac7 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

experimental fix for MC crash

parent c9246ec7
Loading
Loading
Loading
Loading
Loading
+30 −0
Original line number Diff line number Diff line
@@ -1698,6 +1698,36 @@ void ivas_jbm_dec_prepare_renderer(
        if ( st_ivas->mc_mode == MC_MODE_MCT )
        {
            ivas_jbm_dec_td_renderers_adapt_subframes( st_ivas );
            if ( st_ivas->hBinRendererTd == NULL && st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
                ivas_error error;
                if ( ivas_td_binaural_open( st_ivas ) != IVAS_ERR_OK )
                {
                    return;
                }
                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
                    if ( ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) != IVAS_ERR_OK )
                    {
                        return;
                    }
                }

                if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
                    if ( ( error = ivas_rend_initCrendWrapper( &st_ivas->hCrendWrapper, 1 ) ) != IVAS_ERR_OK )
                    {
                        return;
                    }

                    st_ivas->hCrendWrapper->hCrend[0] = NULL;
                    st_ivas->hCrendWrapper->hHrtfCrend = NULL;
                    if ( ( st_ivas->hCrendWrapper->hCrend[0] = (CREND_HANDLE) malloc( sizeof( CREND_DATA ) ) ) == NULL )
                    {
                        return;
                    }
                }
            }
        }
        else if ( st_ivas->mc_mode == MC_MODE_PARAMUPMIX )
        {
+19 −16
Original line number Diff line number Diff line
@@ -1238,6 +1238,8 @@ static ivas_error ivas_mc_dec_reconfig(
                }
            }
            else if ( st_ivas->hBinRendererTd == NULL && st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD )
            {
                if ( st_ivas->mc_mode != MC_MODE_MCT )
                {
                    if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
                    {
@@ -1266,6 +1268,7 @@ static ivas_error ivas_mc_dec_reconfig(
                        }
                    }
                }
            }
            else if ( st_ivas->hCrendWrapper == NULL && ( st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM ) )
            {
#ifdef FIX_CREND_SIMPLIFY_CODE