Commit 2c0175ad authored by malenov's avatar malenov
Browse files

further modification to the if condition to prevent access to hCPE->hStereoTD...

further modification to the if condition to prevent access to hCPE->hStereoTD during switching from MDCT stereo
parent b99e2c0e
Loading
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -145,14 +145,16 @@ int16_t select_stereo_mode(
    }
    else if ( element_mode < IVAS_CPE_MDCT )
    {
        if ( stereo_switching_flag == 0 )
        {
#ifdef DEBUGGING
        if ( hCPE->stereo_mode_cmdl > 1 && stereo_switching_flag == 0 )
            if ( hCPE->stereo_mode_cmdl > 1 )
            {
                element_mode = hCPE->stereo_mode_cmdl;
            }
        else
#endif
            if ( element_mode == IVAS_CPE_TD )
        }
        else if ( element_mode == IVAS_CPE_TD )
        {
            if ( hCPE->hStereoTD->prev_fr_LRTD_TD_dec > 0 && is_speech )
            {
@@ -189,6 +191,7 @@ int16_t select_stereo_mode(
        if ( hCPE->last_element_mode != IVAS_CPE_DFT && hCPE->last_element_mode != IVAS_CPE_TD )
        {
            int16_t lrtd_mode = hStereoClassif->lrtd_mode;

            /* reset stereo classifier when switching from MDCT stereo to Unified stereo */
            stereo_classifier_init( hCPE->hStereoClassif );