From 5e333cb5857d485e41682c33b9cb9e4ed2d9833d Mon Sep 17 00:00:00 2001 From: vaclav Date: Thu, 16 Oct 2025 10:12:06 +0200 Subject: [PATCH] port FIX_1384_MSAN_ivas_spar_dec_open --- lib_com/ivas_cnst.h | 3 +++ lib_com/options.h | 1 + lib_dec/ivas_init_dec_fx.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/lib_com/ivas_cnst.h b/lib_com/ivas_cnst.h index 321745b9a..4e5f8871c 100644 --- a/lib_com/ivas_cnst.h +++ b/lib_com/ivas_cnst.h @@ -249,6 +249,9 @@ typedef enum /* format signaling in SID frames */ #define SID_FORMAT_NBITS 3 /* Bit 0 | Bit 1 | Bit 2 */ /*-------|-------|------ */ +#ifdef FIX_1384_MSAN_ivas_spar_dec_open +#define SID_FORMAT_NONE (-0x1) /* n/a| n/a| n/a*/ +#endif #define SID_DFT_STEREO 0x0 /* 0| 0| 0 */ #define SID_MDCT_STEREO 0x1 /* 1| 0| 0 */ #define SID_ISM 0x2 /* 0| 1| 0 */ diff --git a/lib_com/options.h b/lib_com/options.h index d963b98fa..be152b927 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -115,6 +115,7 @@ #define NONBE_FIX_1297_SPAR_JBM_MEM_SAN /* Dolby: issue 1297, SPAR + JBM + BR switch memory sanitizer */ #define NONBE_1303_GRANULARITY_OSBA_REND /* VA: issue 1303: Correctly set the granularity in OSBA, Disc mode, and BINAURAL_ROOM_REVERB output */ #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() */ // object-editing feature porting #define OBJ_EDITING_API /* object editing changes related to the API */ diff --git a/lib_dec/ivas_init_dec_fx.c b/lib_dec/ivas_init_dec_fx.c index 2aaf6a147..0944f3d7d 100644 --- a/lib_dec/ivas_init_dec_fx.c +++ b/lib_dec/ivas_init_dec_fx.c @@ -1385,6 +1385,10 @@ ivas_error ivas_init_decoder_front( move32(); st_ivas->mc_mode = MC_MODE_NONE; move32(); +#ifdef FIX_1384_MSAN_ivas_spar_dec_open + st_ivas->sid_format = SID_FORMAT_NONE; + move16(); +#endif st_ivas->sba_dirac_stereo_flag = 0; move16(); -- GitLab