diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-24 10:50:56 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2017-07-24 10:51:40 +0200 |
commit | 9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674 (patch) | |
tree | 2888115abc44800a29c46cfb0c7c3636e14c215d /src | |
parent | 7862ca859932474649b0a933fac7ac20d5ec2da3 (diff) | |
download | ODR-AudioEnc-9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674.tar.gz ODR-AudioEnc-9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674.tar.bz2 ODR-AudioEnc-9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674.zip |
Verify that exactly one input is defined
Diffstat (limited to 'src')
-rw-r--r-- | src/odr-audioenc.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 6fde0a5..a33cd2e 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -636,7 +636,11 @@ int main(int argc, char *argv[]) if (jack_name) num_inputs++; if (vlc_uri != "") num_inputs++; - if (num_inputs > 1) { + if (num_inputs == 0) { + fprintf(stderr, "No input defined!\n"); + return 1; + } + else if (num_inputs > 1) { fprintf(stderr, "You must define only one possible input, not several!\n"); return 1; } |