diff --git a/lib_com/options.h b/lib_com/options.h index fe6c9fe2df75ec12b4d734615d5e92dcfefcaaf9..06332990eb995dc062cd531a7f8442d0f68a86a4 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -158,7 +158,8 @@ #define DFT_STEREO_SPAR_MIXING #ifdef DFT_STEREO_SPAR_MIXING -#define FIX_345_MSAN_ERROR /* FhG. Fix memory sanitizer error in PLC modes */ +#define FIX_345_MSAN_ERROR /* FhG: Fix memory sanitizer error in PLC modes */ +#define FIX_347_DTX_CRASH /* FhG: Fix crash that can happen with DTX */ /*#define DFT_STEREO_SPAR_MIXING_DEBUG*/ /* more debugging output for DFT_STEREO_SPAR_MIXING_DEBUG */ #define DISABLE_RES_CHANNELS_MCT /* decode only W and residual for Y when outputting to stereo */ #endif diff --git a/lib_dec/ivas_core_dec.c b/lib_dec/ivas_core_dec.c old mode 100644 new mode 100755 index ccc752fdc5f7f51877051799bd873879dbecdbee..be6f38d4581091b690f9d91ea1dc8fa4946e31d1 --- a/lib_dec/ivas_core_dec.c +++ b/lib_dec/ivas_core_dec.c @@ -240,7 +240,11 @@ ivas_error ivas_core_dec( hCPE->hStereoCng->flag_cna_fade = 0; } +#ifdef FIX_347_DTX_CRASH + if ( sba_dirac_stereo_flag && hSCE && sts[0]->total_brate <= SID_2k40 && sts[0]->cng_type == FD_CNG ) +#else if ( sba_dirac_stereo_flag && sts[0]->total_brate <= SID_2k40 && sts[0]->cng_type == FD_CNG ) +#endif { save_hb_synth = hSCE->save_hb_synth; } @@ -461,7 +465,11 @@ ivas_error ivas_core_dec( /* for FD-CNG we need the delay compensation in the synth, so do this afterwards */ +#ifdef FIX_347_DTX_CRASH + if ( sba_dirac_stereo_flag && hSCE && st->core_brate == SID_2k40 && st->cng_type == FD_CNG ) +#else if ( sba_dirac_stereo_flag && st->core_brate == SID_2k40 && st->cng_type == FD_CNG ) +#endif { mvr2r( synth[n], hSCE->save_synth, output_frame ); }