Commit 028e3437 authored by TYAGIRIS's avatar TYAGIRIS
Browse files

Fix for LFE re-allocation during MC reconfig

parent 2bd7a161
Loading
Loading
Loading
Loading
Loading
+17 −1
Original line number Diff line number Diff line
@@ -934,15 +934,22 @@ static ivas_error ivas_mc_dec_reconfig(
            {
                ivas_mct_dec_close( &st_ivas->hMCT );
            }

#ifndef FIX_722_MEMORY_LEAK_IN_PARAMUPMIX
            /* LFE handle */
            ivas_lfe_dec_close( &( st_ivas->hLFE ) );
#endif
        }
#ifdef FIX_722_MEMORY_LEAK_IN_PARAMUPMIX
        else if ( last_mc_mode == MC_MODE_PARAMUPMIX )
        {
            ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) );
        }

        if ( st_ivas->hLFE != NULL )
        {
            /* LFE handle */
            ivas_lfe_dec_close( &( st_ivas->hLFE ) );
        }
#endif
    }
    else if ( st_ivas->mc_mode == MC_MODE_MCMASA )
@@ -979,10 +986,19 @@ static ivas_error ivas_mc_dec_reconfig(
        if ( last_mc_mode == MC_MODE_MCT )
        {
            ivas_mct_dec_close( &st_ivas->hMCT );
#ifndef FIX_722_MEMORY_LEAK_IN_PARAMUPMIX
            /* LFE handle */
            ivas_lfe_dec_close( &( st_ivas->hLFE ) );
#endif
        }

#ifdef FIX_722_MEMORY_LEAK_IN_PARAMUPMIX
        if ( st_ivas->hLFE != NULL )
        {
            /* LFE handle */
            ivas_lfe_dec_close( &( st_ivas->hLFE ) );
        }
#endif
    }

    if ( st_ivas->mc_mode != MC_MODE_MCMASA )