aboutsummaryrefslogtreecommitdiffstats
path: root/fftools/cmdutils.c
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2023-12-17 14:42:38 +0100
committerAnton Khirnov <anton@khirnov.net>2023-12-22 11:39:57 +0100
commit148fac277a173473eed4ea6b03c7575e5696b3fa (patch)
tree95fdf8bd09e01f15b5cfd277be1eff18deaab9e2 /fftools/cmdutils.c
parent0ba70a679216a504ed4ea6f50c37283cf099e8ae (diff)
downloadffmpeg-148fac277a173473eed4ea6b03c7575e5696b3fa.tar.gz
fftools/ffmpeg: change the MATCH_PER_TYPE_OPT macro into a function
There is no reason for it to be a macro anymore, this makes the code using it cleaner and simpler.
Diffstat (limited to 'fftools/cmdutils.c')
-rw-r--r--fftools/cmdutils.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/fftools/cmdutils.c b/fftools/cmdutils.c
index f53c4b7aec..26e5e6e986 100644
--- a/fftools/cmdutils.c
+++ b/fftools/cmdutils.c
@@ -239,14 +239,15 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
* a global var*/
void *dst = po->flags & OPT_FLAG_OFFSET ?
(uint8_t *)optctx + po->u.off : po->u.dst_ptr;
+ SpecifierOptList *sol = NULL;
double num;
int ret;
if (po->flags & OPT_FLAG_SPEC) {
- SpecifierOptList *sol = dst;
char *p = strchr(opt, ':');
char *str;
+ sol = dst;
ret = GROW_ARRAY(sol->opt, sol->nb_opt);
if (ret < 0)
return ret;
@@ -312,6 +313,9 @@ static int write_option(void *optctx, const OptionDef *po, const char *opt,
if (po->flags & OPT_EXIT)
return AVERROR_EXIT;
+ if (sol)
+ sol->type = po->type;
+
return 0;
}