cmdutils: Fix overriding flags on the command line.

Previously the code just appended the strings of flags which
worked with "+bitexact" but would not work with something like "0"

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/150/head
Michael Niedermayer 10 years ago
parent 6dbaeed6b7
commit 408c9cf0e2
  1. 2
      cmdutils.c

@ -532,7 +532,7 @@ static const AVOption *opt_find(void *obj, const char *name, const char *unit,
return o;
}
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS) ? AV_DICT_APPEND : 0
#define FLAGS (o->type == AV_OPT_TYPE_FLAGS && (arg[0]=='-' || arg[0]=='+')) ? AV_DICT_APPEND : 0
int opt_default(void *optctx, const char *opt, const char *arg)
{
const AVOption *o;

Loading…
Cancel
Save