diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-22 12:28:51 +0000 |
---|---|---|
committer | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2010-02-22 12:28:51 +0000 |
commit | 33bc794738224930f8ac07865861d07cbb959e3b (patch) | |
tree | f869386de976100f080dbfd69984375ee3e18619 | |
parent | fb030bd0461eca0f544782c5a1373620def90772 (diff) | |
download | ffmpeg-33bc794738224930f8ac07865861d07cbb959e3b.tar.gz |
Make opt_default() print an error message and exit if the option
supplied is not recognized.
Originally committed as revision 21960 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmdutils.c b/cmdutils.c index b21380eef1..90c165e42e 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -214,8 +214,10 @@ int opt_default(const char *opt, const char *arg){ fprintf(stderr, "Invalid value '%s' for option '%s'\n", arg, opt); exit(1); } - if(!o) - return -1; + if (!o) { + fprintf(stderr, "Unrecognized option '%s'\n", opt); + exit(1); + } // av_log(NULL, AV_LOG_ERROR, "%s:%s: %f 0x%0X\n", opt, arg, av_get_double(avcodec_opts, opt, NULL), (int)av_get_int(avcodec_opts, opt, NULL)); |