mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-08 06:09:50 +00:00
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).
This commit is contained in:
parent
1dd6363581
commit
bd0cbebf3e
3 changed files with 7 additions and 3 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue