diff --git a/lib_com/options.h b/lib_com/options.h index cc7f82754f08cdfcdcadbb276c7180f76d34d8f4..06279851a773b1541e28eefcd537aff345d6a148 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -113,6 +113,7 @@ #define FIX_1384_MSAN_stereo_tcx_core_enc /* VA: issue 1384: fix use-of-uninitialized value in stereo_tcx_core_enc() */ #define NONBE_1303_REND_GRANULARITY /* VA: issue 1303: Renderer granularity revision */ #define FIX_1384_MSAN_ivas_spar_dec_open /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */ +#define FIX_1388_MSAN_ivas_init_decoder /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */ // object-editing feature porting #define OBJ_EDITING_API /* object editing changes related to the API */ diff --git a/lib_dec/lib_dec_fx.c b/lib_dec/lib_dec_fx.c index bb0d10b720afc67338b6b24f0f31e6bc63954fc3..559a4444e6e409b8d12d3d505a3bc492bbe82451 100644 --- a/lib_dec/lib_dec_fx.c +++ b/lib_dec/lib_dec_fx.c @@ -1003,12 +1003,25 @@ ivas_error IVAS_DEC_FeedFrame_Serial( { ivas_error error; +#ifdef FIX_1388_MSAN_ivas_init_decoder + test(); + IF( hIvasDec == NULL || hIvasDec->st_ivas == NULL ) + { + return IVAS_ERR_UNEXPECTED_NULL_POINTER; + } +#endif + IF( !hIvasDec->isInitialized ) { /* Once first frame is fed, finish initialization in EVS Mono. * In IVAS mode, initialization is done in ivas_dec(). */ IF( EQ_16( hIvasDec->mode, IVAS_DEC_MODE_EVS ) ) { +#ifdef FIX_1388_MSAN_ivas_init_decoder + hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; + move32(); + +#endif IF( NE_32( ( error = ivas_init_decoder_fx( hIvasDec->st_ivas ) ), IVAS_ERR_OK ) ) { return error; @@ -1034,11 +1047,13 @@ ivas_error IVAS_DEC_FeedFrame_Serial( hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = imult3216( hIvasDec->hVoIP->hCurrentDataUnit->dataSize, FRAMES_PER_SEC ); move32(); } +#ifndef FIX_1388_MSAN_ivas_init_decoder ELSE { hIvasDec->st_ivas->hDecoderConfig->ivas_total_brate = ACELP_8k00; move32(); } +#endif hIvasDec->isInitialized = true; move16(); }