summaryrefslogtreecommitdiffstats
path: root/src/odr-audioenc.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2019-04-09 07:30:21 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2019-04-09 07:30:21 +0200
commit3e4d4bedc87a67cc00c876e977397f93d75e46a9 (patch)
tree23236e711e061efcd9a31df94bc7ec76fda6f2a4 /src/odr-audioenc.cpp
parent30cd401545ab8af6057c2d8fc94c929a9b21fc0a (diff)
downloadODR-AudioEnc-3e4d4bedc87a67cc00c876e977397f93d75e46a9.tar.gz
ODR-AudioEnc-3e4d4bedc87a67cc00c876e977397f93d75e46a9.tar.bz2
ODR-AudioEnc-3e4d4bedc87a67cc00c876e977397f93d75e46a9.zip
Fail if invalid -f option is given
Diffstat (limited to 'src/odr-audioenc.cpp')
-rw-r--r--src/odr-audioenc.cpp7
1 files 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;