From 408c9cf0e21d83d21865c3e27e1c44a9da30a98c Mon Sep 17 00:00:00 2001
From: Michael Niedermayer <michael@niedermayer.cc>
Date: Sat, 8 Aug 2015 14:56:29 +0200
Subject: [PATCH] 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>
---
 cmdutils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmdutils.c b/cmdutils.c
index e87d5eef75..51fd7c9b32 100644
--- a/cmdutils.c
+++ b/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;