From e4cf58fb00c05b729f434f067474c031d9689985 Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Sat, 4 Oct 2025 21:45:09 +0200 Subject: [PATCH] port 2227 to main --- apps/renderer.c | 15 +++++++++++++++ lib_com/options.h | 1 + 2 files changed, 16 insertions(+) diff --git a/apps/renderer.c b/apps/renderer.c index a8b4a067d..5eba07e53 100644 --- a/apps/renderer.c +++ b/apps/renderer.c @@ -643,12 +643,27 @@ static void setupWithSingleFormatInput( positionProvider->numObjects = args.inConfig.numAudioObjects; for ( int16_t i = 0; i < positionProvider->numObjects; ++i ) { +#ifdef FIX_1376_MISSING_ISM_METADATA + /* Check if path to metadata file was given */ + if ( isEmptyString( args.inMetadataFilePaths[i] ) ) + { + fprintf( stderr, "No metadata file was given for ISM input %d\n", i ); + exit( -1 ); + } + + /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string contains "NULL" */ +#else /* It is allowed on CLI to have no metadata for an ISM input - skip opening if string is empty or contains "NULL" */ +#endif char charBuf[FILENAME_MAX]; strncpy( charBuf, args.inMetadataFilePaths[i], min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1 ); charBuf[min( FILENAME_MAX, RENDERER_MAX_CLI_ARG_LENGTH ) - 1] = '\0'; to_upper( charBuf ); +#ifdef FIX_1376_MISSING_ISM_METADATA + if ( strncmp( charBuf, "NULL", 4 ) == 0 ) +#else if ( isEmptyString( args.inMetadataFilePaths[i] ) || strncmp( charBuf, "NULL", 4 ) == 0 ) +#endif { continue; } diff --git a/lib_com/options.h b/lib_com/options.h index fdf73590a..b0518f235 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -137,6 +137,7 @@ #define FIX_1053_REVERB_RECONFIGURATION #define TMP_FIX_1119_SPLIT_RENDERING_VOIP /* FhG: Add error check for unsupported config: split rendering with VoIP mode */ #define FIX_1113_EXTREND_ISAR /* FhG: issue 1113: fix external renderer asserts for FOA/HOA2 and CLDFB config */ +#define FIX_1376_MISSING_ISM_METADATA /* FhG: IVAS_rend: throw error if there exists an ISM input without a corresponding metadata file path */ /* #################### End BASOP porting switches ############################ */ -- GitLab