Commit e37facbf authored by Jan Kiene's avatar Jan Kiene
Browse files

only copy from buffer if it was written to before

parent 5163331a
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -153,6 +153,7 @@
#define FIX_I173_I174                                   /* Issues 173 and 174: Remove frame and subframe index from ISm metadata and headtracking respectively. */
#define FIX_TCX_DEC_RECONF_BFI
#define FIX_SBA_DTX_DECODE_ERROR                        /* Issue 176: SBA decoder error with DTX at 80kbps SWB, Issue 21: SBA front-VAD threshold (203) */
#define FIX_MSAN_ERROR_STEREO_RATE_SWITCHING            /* addresses Issue 177 */

/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+4 −0
Original line number Diff line number Diff line
@@ -478,7 +478,11 @@ void stereo_dft_dec_core_switching(
                mvr2r( output, pAp_input, st->L_frame );
            }

#ifdef FIX_MSAN_ERROR_STEREO_RATE_SWITCHING
            if ( st->last_core == ACELP_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) && !st->tcxonly ) /* ACELP -> TCX/HQ-Core */
#else
            if ( st->last_core == ACELP_CORE && !( st->prev_bfi == 1 && st->last_core == ACELP_CORE && st->last_con_tcx == 1 ) ) /* ACELP -> TCX/HQ-Core */
#endif
            {
                mvr2r( tcx_core_buf, tmp_fade, ap_fade_len );
                for ( i = 0; i < ap_fade_len; i++ )