diff --git a/lib_com/options.h b/lib_com/options.h index 2e14c9035f87cce4af8be30be59f102ba3d039c7..ab6d116170ad8a915e79b01993d275205f591336 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -155,6 +155,7 @@ #define FIX_2140_OBJECT_EDITING_SANITIZER_ISSUES /* Nokia: Issue 2140, fixes three different sanitizer issues persisting in object editing code. */ #define FIX_2193_ISM_GAINS_WITH_OE /* FhG: fix issue 2193: use edited angles in ISM gain calculation */ #define FIX_2192_OBJ_EDITING_EXT_METADATA /* Eri: Add support for extended metadata in object editing */ +#define FIX_BASOP_ISSUE_1585_CUT_BS_CRASH /* FhG: Fix for BASOP issue 1585 crash of a cut bitstream, also valid for float code*/ // RTPDUMP porting #define RTP_S4_251135_CR26253_0016_REV1 /* RTP Pack/Unpack API corresponding to CR 26253 */ diff --git a/lib_dec/ivas_mdct_core_dec_fx.c b/lib_dec/ivas_mdct_core_dec_fx.c index e7507607ffd3d9971450a4d93ca30ed91cb69446..f9d7386954e401b0e4f94d673a6adbf71a8a85b5 100644 --- a/lib_dec/ivas_mdct_core_dec_fx.c +++ b/lib_dec/ivas_mdct_core_dec_fx.c @@ -185,6 +185,15 @@ static void dec_prm_tcx_sidebits_fx( move16(); } +#ifdef FIX_BASOP_ISSUE_1585_CUT_BS_CRASH + /* for first frame reset last_core to initialization value for better error-robustness*/ + IF( EQ_16( st->ini_frame, 0 ) ) + { + st->last_core = TCX_20_CORE; + move16(); + } +#endif + getTCXWindowing_ivas_fx( st->core, st->last_core, st->element_mode, st->hTcxCfg, st0 ); st->hTcxDec->kernel_type[0] = st->hTcxDec->kernel_type[1] = MDCT_IV;