mirror of https://git.ffmpeg.org/ffmpeg.git
fftools/cmdutils: check valid flags for OPT_TYPE_FUNC
SPEC and OFFSET do not make sense for functions.
This commit is contained in:
parent
2f1bc3b424
commit
5792382269
|
@ -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));
|
||||
|
||||
|
|
Loading…
Reference in New Issue