ref: 72b9b34da75f4beee3b8766529408e59c92c342e
parent: 7664d811a8cd9ef4f9a593ce2a9bf731e87e2040
author: Gregory Maxwell <[email protected]>
date: Fri Oct 28 23:45:13 EDT 2011
Newly introduced check_encoder_option failed unconditionally instead of only when you used the wrong options.
--- a/src/opus_demo.c
+++ b/src/opus_demo.c
@@ -88,8 +88,8 @@
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 @@
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[])