Newly introduced check_encoder_option failed unconditionally instead of only when...
authorGregory Maxwell <greg@xiph.org>
Sat, 29 Oct 2011 07:45:13 +0000 (03:45 -0400)
committerGregory Maxwell <greg@xiph.org>
Sat, 29 Oct 2011 07:45:13 +0000 (03:45 -0400)
src/opus_demo.c

index 3ec4b10..23c2128 100644 (file)
@@ -88,8 +88,8 @@ static void check_decoder_option(int encode_only, const char *opt)
    if (encode_only)
    {
       fprintf(stderr, "option %s is only for decoding\n", opt);
+      exit(EXIT_FAILURE);
    }
-   exit(EXIT_FAILURE);
 }
 
 static void check_encoder_option(int decode_only, const char *opt)
@@ -97,8 +97,8 @@ static void check_encoder_option(int decode_only, const char *opt)
    if (decode_only)
    {
       fprintf(stderr, "option %s is only for encoding\n", opt);
+      exit(EXIT_FAILURE);
    }
-   exit(EXIT_FAILURE);
 }
 
 int main(int argc, char *argv[])