Commit 7b562139 authored by vaclav's avatar vaclav
Browse files

fix MASA non-JBM BR switching crash

parent d817b428
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2395,7 +2395,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
#ifdef FIX_NCHAN_BUFFERS
    /* 2 channels of the TC buffer for smooth transition in bitrate swithing within 1 CPE and TD decorr. on and off */
    num_tc_buffer_mem = min( hTcBuffer->nchan_buffer_full, CPE_CHANNELS );
    if ( st_ivas->hDecoderConfig->Opt_tsm )
    if ( st_ivas->hDecoderConfig->Opt_tsm && num_tc_buffer_mem == CPE_CHANNELS )
    {
        mvr2r( hTcBuffer->tc_buffer, tc_buffer_mem, num_tc_buffer_mem * NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) );
    }
@@ -2506,7 +2506,7 @@ ivas_error ivas_jbm_dec_tc_buffer_reconfigure(
    }

#ifdef FIX_NCHAN_BUFFERS
    if ( st_ivas->hDecoderConfig->Opt_tsm )
    if ( st_ivas->hDecoderConfig->Opt_tsm && num_tc_buffer_mem == CPE_CHANNELS && hTcBuffer->nchan_buffer_full == CPE_CHANNELS )
    {
        mvr2r( tc_buffer_mem, hTcBuffer->tc_buffer, num_tc_buffer_mem * NS2SA( st_ivas->hDecoderConfig->output_Fs, MAX_JBM_L_FRAME_NS ) );
    }