diff --git a/apps/decoder.c b/apps/decoder.c index de0dd8bca9161e73bf2e5f856a5de51884ac6c89..eeb2a19f20c1baba67e96b140f4beb1712e0a3ce 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -1704,6 +1704,15 @@ static bool parseCmdlIVAS_dec( usage_dec(); return false; } + +#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK + if ( arg->outputMdFilename != NULL && arg->outputConfig != IVAS_AUDIO_CONFIG_BINAURAL_SPLIT_PCM ) + { + fprintf( stderr, "Error: Output split rendering metadata file is supported for BINAURAL_SPLIT_PCM output config. only\n\n" ); + usage_dec(); + return false; + } +#endif } else { @@ -1990,6 +1999,14 @@ static ivas_error initOnFirstGoodFrame( } else { +#ifdef FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK + if ( arg.outputMdFilename == NULL ) + { + fprintf( stderr, "\nOutput split rendering metadata file not specified\n" ); + return IVAS_ERR_INVALID_SPLIT_REND_CONFIG; + } +#endif + if ( ( error = split_rend_writer_open( splitRendWriter, arg.outputMdFilename, delayNumSamples_temp[0], delayTimeScale_temp, splitRendCodec, poseCorrection, splitRendCodecFrameSizeMs ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to open output split rendering metadata file %s\n", arg.outputWavFilename ); diff --git a/lib_com/options.h b/lib_com/options.h index 43cb02520ede8f5b965f04b2be7cd46f3c0afd4d..e1afdee81a239594712facefcdb93f8de1eebae1 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -159,7 +159,7 @@ #define FIX_NUM_SUBFRAME_UPDATE #define FIX_1053_REVERB_RECONFIGURATION /* Philips: issue 1053: fix for dynamic switching of acoustic environment */ - +#define FIX_1081_BINAURAL_SPLIT_PCM_SANITY_CHECK /* VA: issue 1081: correct error print-out when BINAURAL_SPLIT_PCM is requested */ /* #################### End BE switches ################################## */