Commit ff4d60ee authored by Jouni Paulus's avatar Jouni Paulus
Browse files

force internal config re-init in MC bitrate switching. this fixes crashes with BINAURAL output

parent 6f134ab7
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -73,12 +73,6 @@ ivas_error ivas_mcmasa_dec_reconfig(
    /* get new McMASA settings */
    ivas_mcmasa_setNumTransportChannels( &( st_ivas->nchan_transport ), &( st_ivas->element_mode_init ), ivas_total_brate );
    ivas_mcmasa_set_separate_channel_mode( &( st_ivas->hOutSetup.separateChannelEnabled ), &( st_ivas->hOutSetup.separateChannelIndex ), ivas_total_brate );

    /* renderer might change as an effect from the transport mode change */
    ivas_renderer_select( st_ivas );

    /* side effect of the renderer selection can be a changed internal config. this is also needed when switching from non-McMASA  */
    ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config );
    ivas_mcmasa_set_separate_channel_mode( &( st_ivas->hIntSetup.separateChannelEnabled ), &( st_ivas->hIntSetup.separateChannelIndex ), ivas_total_brate );

    if ( ( error = ivas_masa_dec_open( st_ivas ) ) != IVAS_ERR_OK )
+3 −1
Original line number Diff line number Diff line
@@ -681,9 +681,11 @@ ivas_error ivas_mc_dec_reconfig(
    }
    st_ivas->sba_dirac_stereo_flag = 0; /* needs to be after getNumChanSynthesis() */

    /* renderer might have changed, reselect */
    /* renderer might change as an effect from the transport mode change, reselect */
    renderer_type_old = st_ivas->renderer_type;
    ivas_renderer_select( st_ivas );
    /* side effect of the renderer selection can be a changed internal config */
    ivas_output_init( &( st_ivas->hIntSetup ), st_ivas->intern_config );

    if ( st_ivas->mc_mode == MC_MODE_MCT )
    {