diff options
author | Anton Khirnov <anton@khirnov.net> | 2022-03-09 21:46:43 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2022-03-22 18:49:43 +0100 |
commit | bd0cbebf3e495b5f41e8dd307311d6bcc6d7da85 (patch) | |
tree | a007aef6e0abf11bfa4132303d62ed42bc71b207 /fftools/cmdutils.c | |
parent | 1dd63635817e467585aba5653e3e0119e9c2d1cc (diff) |
fftools: drop the fake "default" option from ffplay/ffprobe
It tries to process any unhandled options as AVOptions. Handle this
directly in cmdutils.c, without resorting to a confusing fake option
definition (which is currently visible to the users in -help output).
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r-- | fftools/cmdutils.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 8d88f18fb3..e8047e575c 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -303,6 +303,12 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt, int parse_option(void *optctx, const char *opt, const char *arg, const OptionDef *options) { + static const OptionDef opt_avoptions = { + .name = "AVOption passthrough", + .flags = HAS_ARG, + .u.func_arg = opt_default, + }; + const OptionDef *po; int ret; @@ -316,7 +322,7 @@ int parse_option(void *optctx, const char *opt, const char *arg, arg = "1"; if (!po->name) - po = find_option(options, "default"); + po = &opt_avoptions; if (!po->name) { av_log(NULL, AV_LOG_ERROR, "Unrecognized option '%s'\n", opt); return AVERROR(EINVAL); |