]> git.ipfire.org Git - thirdparty/shairport-sync.git/commitdiff
make sndio formats case-insensitive, fix a little error message
authorMike Brady <mikebrady@eircom.net>
Sat, 29 Jul 2017 15:20:58 +0000 (17:20 +0200)
committerMike Brady <mikebrady@eircom.net>
Sat, 29 Jul 2017 15:20:58 +0000 (17:20 +0200)
audio_sndio.c

index 92f73bed9d773aa6681fc0bb2d18eb972390f9db..e7fd787b956fbc632b99e765d692c7f89a7bf68f 100644 (file)
@@ -136,15 +136,15 @@ static int init(int argc, char **argv) {
     }
     if (config_lookup_string(config.cfg, "sndio.format", &tmp)) {
       for (i = 0, found = 0; i < sizeof(formats) / sizeof(formats[0]); i++) {
-        if (strcmp(formats[i].name, tmp) == 0) {
+        if (strcasecmp(formats[i].name, tmp) == 0) {
           config.output_format = formats[i].fmt;
           found = 1;
           break;
         }
       }
       if (!found)
-        die("Invalid output format \"%s\". Should be one of: s8, u8, s16, s24, "
-            "s24le3, s24be3, s32",
+        die("Invalid output format \"%s\". Should be one of: S8, U8, S16, S24, "
+            "S24_3LE, S24_3BE, S32",
             tmp);
     }
   }