diff options
author | Alexandra Khirnova <alexandra@khirnov.net> | 2012-01-27 08:59:00 +0000 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2012-01-27 10:27:00 +0100 |
commit | 570f6aaab12e2bcf6605e9e3a5e1204b3cfccfc1 (patch) | |
tree | 0240325096ae3900f9df2c388f1e79460262c554 /cmdutils.c | |
parent | 412b248edb43d435e31d7502e49b9ba9cad50b2d (diff) | |
download | ffmpeg-570f6aaab12e2bcf6605e9e3a5e1204b3cfccfc1.tar.gz |
cmdutils: fix options starting with 'no'.
E.g. non_linear_quant mpeg2video private option.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
Diffstat (limited to 'cmdutils.c')
-rw-r--r-- | cmdutils.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/cmdutils.c b/cmdutils.c index 0a87deedbb..e8f1732416 100644 --- a/cmdutils.c +++ b/cmdutils.c @@ -233,14 +233,12 @@ int parse_option(void *optctx, const char *opt, const char *arg, if (!po->name && opt[0] == 'n' && opt[1] == 'o') { /* handle 'no' bool option */ po = find_option(options, opt + 2); - if (!(po->name && (po->flags & OPT_BOOL))) - goto unknown_opt; - bool_val = 0; + if ((po->name && (po->flags & OPT_BOOL))) + bool_val = 0; } if (!po->name) po = find_option(options, "default"); if (!po->name) { -unknown_opt: av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); return AVERROR(EINVAL); } |