summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-24 10:50:56 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-07-24 10:51:40 +0200
commit9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674 (patch)
tree2888115abc44800a29c46cfb0c7c3636e14c215d /src
parent7862ca859932474649b0a933fac7ac20d5ec2da3 (diff)
downloadODR-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.cpp6
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;
}