Commit 2f21403e authored by Jan Brouwer's avatar Jan Brouwer
Browse files

add robustness check for renderer -aeid parsing; report error when specified...

add robustness check for renderer -aeid parsing; report error when specified acoustic environment ID is not found in the renderer configuration
parent 76641541
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -692,7 +692,11 @@ int main(
                    goto cleanup;
                }
            }
#ifdef FIX_708_AEID_COMMAND_LINE
            else
#else
            else if ( error != IVAS_ERR_ACOUSTIC_ENVIRONMENT_MISSING )
#endif
            {
                fprintf( stderr, "Failed to get acoustic environment with ID: %d\n\n", arg.acousticEnvironmentId );
                goto cleanup;
+7 −0
Original line number Diff line number Diff line
@@ -2745,6 +2745,13 @@ static void parseOption(
            break;
        case CmdLnOptionId_acousticEnvironmentId:
            assert( numOptionValues == 1 );
#ifdef FIX_708_AEID_COMMAND_LINE
            if ( !is_digits_only( optionValues[0] ) )
            {
                fprintf( stderr, "Invalid acousting environment ID specified: %s\n", optionValues[0] );
                exit( -1 );
            }
#endif
            args->acousticEnvironmentId = (int16_t) strtol( optionValues[0], NULL, 10 );
            break;
        case CmdLnOptionId_syncMdDelay:
+3 −0
Original line number Diff line number Diff line
@@ -275,6 +275,9 @@ static void init_decoder_config(
    hDecoderConfig->Opt_delay_comp = 0;

    hDecoderConfig->Opt_ExternalOrientation = 0;
#ifdef FIX_708_AEID_COMMAND_LINE
    hDecoderConfig->Opt_aeid_on = 0;
#endif

    return;
}