From 9e18f010539eb0d02e5b7f43a20bfcc5ebc3a674 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Mon, 24 Jul 2017 10:50:56 +0200 Subject: Verify that exactly one input is defined --- src/odr-audioenc.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3