Commit 924b0803 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

fix command line parsing and add a check for a meaningful argument

parent a4acf15b
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1727,7 +1727,7 @@ static void usage_dec( void )
    fprintf( stdout, "--------\n" );
#ifdef AMBISONICS_CONVENTIONS
    fprintf( stdout, "-sba_convention n   : Ambisonics convention of the output signal" );
    fprintf( stdout, "                       where n = 0 (ACN-SN3D), 1 (ACN-N3D), 2 (AMBIX), 3 (FuMa-MaxN), 4 (SID-SN3D), 5 (SID-N3D)" );
    fprintf( stdout, "                      where n = 0 (ACN-SN3D), 1 (ACN-N3D), 2 (FuMa-MaxN), 3 (SID-SN3D), 4 (SID-N3D)" );
#endif
    fprintf( stdout, "-VOIP               : VoIP mode: RTP in G192\n" );
    fprintf( stdout, "-VOIP_hf_only=0     : VoIP mode: EVS RTP Payload Format hf_only=0 in rtpdump\n" );
+9 −2
Original line number Diff line number Diff line
@@ -1219,7 +1219,14 @@ static bool parseCmdlIVAS_enc(
            else
            {
                tmp = -1; /* this is to avoid a compilation warning */
                fprintf( stderr, "Error: SBA input convention must be specified, expecting a number!\n\n" );
                fprintf( stderr, "Error: SBA input convention must be specified, expecting a number  in [0,4]!\n\n" );
                usage_enc();
                return false;
            }
			if( tmp < 0 || tmp > 4 )
			{
				tmp = -1; /* this is to avoid a compilation warning */
				fprintf(stderr, "Error: SBA input convention must be specified, expecting a number in [0,4]!\n\n");
				usage_enc();
				return false;
			}
+0 −1
Original line number Diff line number Diff line
@@ -39,7 +39,6 @@ typedef enum
{
    AMBI_FMT_ACN_SN3D = 0,
    AMBI_FMT_ACN_N3D,
    AMBI_FMT_AMBIX,
    AMBI_FMT_FM_MAXN,
    AMBI_FMT_SID_SN3D,
    AMBI_FMT_SID_N3D