From c9725c4362acc6418137fe47790d859bbbbfaa68 Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 14:13:20 +0100 Subject: [PATCH 1/2] FIX_1525_UNINIT_FORMAT_SWITCHING_DEC --- apps/decoder.c | 8 ++++++++ lib_com/options.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/apps/decoder.c b/apps/decoder.c index 44af4ba1e2..36b4bf5a13 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -3371,6 +3371,10 @@ static ivas_error decodeVoIP( *phIvasDec = hIvasDec; /* Update for main()' s free */ ivasRtp.restartNeeded = false; +#ifdef FIX_1525_UNINIT_FORMAT_SWITCHING_DEC + bitstreamReadDone = false; + parametersAvailableForEditing = false; +#endif } /* reference vector */ @@ -3619,6 +3623,10 @@ static ivas_error decodeVoIP( goto cleanup; } *phIvasDec = hIvasDec; /* Update for main()' s free */ +#ifdef FIX_1525_UNINIT_FORMAT_SWITCHING_DEC + bitstreamReadDone = false; + parametersAvailableForEditing = false; +#endif } /* Placeholder for memory reallocation */ diff --git a/lib_com/options.h b/lib_com/options.h index 72e4fa35d4..2ff0286c4d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -177,6 +177,8 @@ #define FIX_FLOAT_1533_BLEND_SUBFR2 /* FhG: float issue 1533: correct blending in blend_subfr2() */ #define FIX_1530_Codec_Level_Harmonization_Non_diegetic_panning /* FhG: Adjust non-diegetic panning law to harmonize codec levels with 3GPP reference software */ +#define FIX_1525_UNINIT_FORMAT_SWITCHING_DEC /* VA: basop issue 1525: fix reading of uninitialized memory in format switching at the decoder */ + /* ##################### End NON-BE switches ########################### */ /* ################## End MAINTENANCE switches ######################### */ -- GitLab From 0c753a76e73f80a22e66b0fe99684cd6fe4606aa Mon Sep 17 00:00:00 2001 From: vaclav Date: Tue, 3 Mar 2026 14:57:55 +0100 Subject: [PATCH 2/2] print decoder setup only once --- apps/decoder.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/decoder.c b/apps/decoder.c index 36b4bf5a13..3b66075cf7 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -4385,12 +4385,13 @@ static ivas_error restartDecoder( } } +#ifndef FIX_1525_UNINIT_FORMAT_SWITCHING_DECaa if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg->voipMode ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } - +#endif /* ISAR frame size is set from command line, not renderer config file. * This will be ignored if output format is not split rendering. */ if ( renderConfig != NULL ) -- GitLab