Commit 981863ba authored by bayers's avatar bayers
Browse files

fix OMASA JBM bitrate switching

parent 968866d6
Loading
Loading
Loading
Loading
Loading
+16 −0
Original line number Diff line number Diff line
@@ -1603,7 +1603,23 @@ void ivas_dirac_dec_set_md_map(
    ivas_jbm_dec_get_adapted_subframes( nCldfbTs, hSpatParamRendCom->subframe_nbslots, &hSpatParamRendCom->nb_subframes );
#ifdef API_5MS
    st_ivas->hTcBuffer->nb_subframes = hSpatParamRendCom->nb_subframes;
#ifdef MASA_AND_OBJECTS
    {
        /* check if the general time resolution is different than the DirAC one (combinded formats)*/
        int16_t i, sf_fac;
        sf_fac = st_ivas->hTcBuffer->n_samples_granularity / hSpatParamRendCom->slot_size;
        for ( i = 0; i < hSpatParamRendCom->nb_subframes; i++ )
        {
#ifdef DEBUGGING
            /* only works if the nb of slots are a multiple of sf_fac, otherwise something was set up wrong */
            assert( ( hSpatParamRendCom->subframe_nbslots[i] % sf_fac ) == 0 );
#endif
            st_ivas->hTcBuffer->subframe_nbslots[i] = hSpatParamRendCom->subframe_nbslots[i] / sf_fac;
        }
    }
#else
    mvs2s( hSpatParamRendCom->subframe_nbslots, st_ivas->hTcBuffer->subframe_nbslots, hSpatParamRendCom->nb_subframes );
#endif
#endif

    /* set mapping according to dirac_read_idx */