[FFmpeg-cvslog] fftools/cmdutils: check valid flags for OPT_TYPE_FUNC
Anton Khirnov
git at videolan.org
Fri Dec 22 12:44:07 EET 2023
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Sun Dec 17 12:03:49 2023 +0100| [579238226901285eff24ef88ae1a53b7f166adf5] | committer: Anton Khirnov
fftools/cmdutils: check valid flags for OPT_TYPE_FUNC
SPEC and OFFSET do not make sense for functions.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=579238226901285eff24ef88ae1a53b7f166adf5
---
fftools/cmdutils.c | 3 +++
1 file changed, 3 insertions(+)
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));
More information about the ffmpeg-cvslog
mailing list