From 3e4d4bedc87a67cc00c876e977397f93d75e46a9 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Tue, 9 Apr 2019 07:30:21 +0200 Subject: Fail if invalid -f option is given --- src/odr-audioenc.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/odr-audioenc.cpp b/src/odr-audioenc.cpp index 9f88a4b..f56c6df 100644 --- a/src/odr-audioenc.cpp +++ b/src/odr-audioenc.cpp @@ -623,10 +623,13 @@ int main(int argc, char *argv[]) settings.drift_compensation = true; break; case 'f': - if(strcmp(optarg, "raw")==0) { + if (strcmp(optarg, "raw") == 0) { settings.raw_input = 1; - } else if(strcmp(optarg, "wav")!=0) + } + else if (strcmp(optarg, "wav") != 0) { usage(argv[0]); + return 1; + } break; case 'i': settings.infile = optarg; -- cgit v1.2.3