Commit 1e98c96c authored by reutelhuber's avatar reutelhuber
Browse files

fix crashes for SBA-to-stereo DTX

parent 3d611769
Loading
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -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

lib_dec/ivas_core_dec.c

100644 → 100755
+8 −0
Original line number Diff line number Diff line
@@ -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;
    }
@@ -457,7 +461,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 );
        }