diff options
author | Anton Khirnov <anton@khirnov.net> | 2023-12-17 12:03:49 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2023-12-22 11:39:57 +0100 |
commit | 579238226901285eff24ef88ae1a53b7f166adf5 (patch) | |
tree | 04dd04c713d732fd43e178f3b44a351731d9c3a9 /fftools | |
parent | 2f1bc3b424f33069e4d870b05898aa1500f9b1ff (diff) | |
download | ffmpeg-579238226901285eff24ef88ae1a53b7f166adf5.tar.gz |
fftools/cmdutils: check valid flags for OPT_TYPE_FUNC
SPEC and OFFSET do not make sense for functions.
Diffstat (limited to 'fftools')
-rw-r--r-- | fftools/cmdutils.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c index 6ca2efef4a..a52c7c5ae4 100644 --- a/fftools/cmdutils.c +++ b/fftools/cmdutils.c @@ -482,6 +482,9 @@ static void check_options(const OptionDef *po) if (po->flags & OPT_PERFILE) av_assert0(po->flags & (OPT_INPUT | OPT_OUTPUT)); + if (po->type == OPT_TYPE_FUNC) + av_assert0(!(po->flags & (OPT_FLAG_OFFSET | OPT_FLAG_SPEC))); + // OPT_FUNC_ARG can only be ser for OPT_TYPE_FUNC av_assert0((po->type == OPT_TYPE_FUNC) || !(po->flags & OPT_FUNC_ARG)); |