aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/cmdutils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-17 11:47:33 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-22 11:39:57 +0100
commit2f1bc3b424f33069e4d870b05898aa1500f9b1ff (patch)
tree9be242e09931ff5d9fb1c9403a9af0ef8bfe14ca /fftools/cmdutils.c
parent66fcfc0009d08ac6ef95f5db4a1b6ee3ba502b8f (diff)
downloadffmpeg-2f1bc3b424f33069e4d870b05898aa1500f9b1ff.tar.gz
fftools/cmdutils: include OPT_PERFILE in OPT_OFFSET
And analogously OPT_OFFSET in OPT_SPEC. Previously the inclusion would be implicit and required all code to remember this.
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r--fftools/cmdutils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index 38f4f542d3..6ca2efef4a 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -237,13 +237,13 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
{
/* new-style options contain an offset into optctx, old-style address of
* a global var*/
- void *dst = po->flags & (OPT_OFFSET | OPT_SPEC) ?
+ void *dst = po->flags & OPT_FLAG_OFFSET ?
(uint8_t *)optctx + po->u.off : po->u.dst_ptr;
int *dstcount;
double num;
int ret;
- if (po->flags & OPT_SPEC) {
+ if (po->flags & OPT_FLAG_SPEC) {
SpecifierOpt **so = dst;
char *p = strchr(opt, ':');
char *str;
@@ -660,7 +660,7 @@ static int finish_group(OptionParseContext *octx, int group_idx,
static int add_opt(OptionParseContext *octx, const OptionDef *opt,
const char *key, const char *val)
{
- int global = !(opt->flags & (OPT_PERFILE | OPT_SPEC | OPT_OFFSET));
+ int global = !(opt->flags & OPT_PERFILE);
OptionGroup *g = global ? &octx->global_opts : &octx->cur_group;
int ret;