diff --git a/lib_com/options.h b/lib_com/options.h index 9d90709d4e2d5ba54131fb23a3c08e9d34f3fd8b..e91b5a9afc8baec85556134436269d8f8e32771a 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -220,6 +220,7 @@ #define FIX_ACCESS_WITHIN_NULL_STRUCT_MC_BW_SWITCHING /* FhG: fix usan error in MCT with bw swicthing */ #define NONBE_FIX_986_MC_BW_SWITCHING /* FhG: fix crash in bw and br switching with MC */ +#define NONBE_FIX_999_JBM_MCT_FLUSH /* FhG: issue #999: fix wrong flushing for MCT at a JBM rate switch */ #define NONBE_FIX_1000_G1_G2_SWB_TBE /* VA: issue 1000: avoid div by zero due to g1 + g2 being zero in SWB TBE */ #define FIX_699_FILE_READER_JBM_TSM /* VA: issue 699: complement FileReader_getFilePath() logic for TSM and JBM */ diff --git a/lib_dec/ivas_jbm_dec.c b/lib_dec/ivas_jbm_dec.c index 638b35cd41ff13d8fd1e7dda78ba3add24681fa2..78a09f5a31476ca1b909f7a94f9025b4370adae1 100644 --- a/lib_dec/ivas_jbm_dec.c +++ b/lib_dec/ivas_jbm_dec.c @@ -1654,7 +1654,11 @@ ivas_error ivas_jbm_dec_flush_renderer( ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } +#ifdef NONBE_FIX_999_JBM_MCT_FLUSH + else if ( renderer_type_old == RENDERER_BINAURAL_OBJECTS_TD ) +#else else if ( st_ivas->renderer_type == RENDERER_BINAURAL_OBJECTS_TD ) +#endif { if ( ( error = ivas_td_binaural_renderer_sf( st_ivas, p_output, hTcBuffer->n_samples_granularity ) ) != IVAS_ERR_OK ) { @@ -1663,6 +1667,12 @@ ivas_error ivas_jbm_dec_flush_renderer( ivas_binaural_add_LFE( st_ivas, hTcBuffer->n_samples_granularity, st_ivas->hTcBuffer->tc, p_output ); } +#ifdef NONBE_FIX_999_JBM_MCT_FLUSH + else + { + return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Wrong renderer in MCT VoIP renderer flushing!" ); + } +#endif } else {