From 991f0beff46d947cd14e40033fde12e9af9cbb1b Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 21 May 2024 10:24:01 +0200 Subject: [PATCH] issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only; under FIX_1099_JBM_MD_HANDLE_ALLOC --- lib_com/options.h | 2 ++ lib_dec/ivas_init_dec.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index 6c4363df17..011a0381c6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -175,6 +175,8 @@ #define FIX_989_TD_REND_ROM /* Eri: Clean-up for TD renderer and completion of ROM generation tool */ #define FIX_1068_ASAN_IN_MC_2_BINAURAL_ROOM_IR /* issue 1068 : Memory leak in MC to BINAURAL_ROOM decoding with bitrate switching*/ +#define FIX_1099_JBM_MD_HANDLE_ALLOC /* VA: issue 1099: Limit the allocation of `hJbmMetadata` handle to MASA and OMASA only */ + /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_init_dec.c b/lib_dec/ivas_init_dec.c index 9b29070053..f6e4ba76c3 100644 --- a/lib_dec/ivas_init_dec.c +++ b/lib_dec/ivas_init_dec.c @@ -2422,7 +2422,11 @@ ivas_error ivas_init_decoder( } } +#ifdef FIX_1099_JBM_MD_HANDLE_ALLOC + if ( ( st_ivas->ivas_format == MASA_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) && st_ivas->hDecoderConfig->Opt_tsm ) +#else if ( st_ivas->hJbmMetadata == NULL && st_ivas->hDecoderConfig->Opt_tsm ) +#endif { if ( st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL ) { -- GitLab