From 72b9b34da75f4beee3b8766529408e59c92c342e Mon Sep 17 00:00:00 2001 From: Gregory Maxwell <greg@xiph.org> Date: Sat, 29 Oct 2011 03:45:13 -0400 Subject: [PATCH] Newly introduced check_encoder_option failed unconditionally instead of only when you used the wrong options. --- src/opus_demo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/opus_demo.c b/src/opus_demo.c index 3ec4b1071..23c2128f8 100644 --- a/src/opus_demo.c +++ b/src/opus_demo.c @@ -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[]) -- GitLab