aboutsummaryrefslogtreecommitdiffstats
path: root/cmdutils.c
diff options
context:
space:
mode:
authortue46wsdgxfjrt <jfbvxt@gmail.com>2014-02-27 16:36:09 -0800
committerMichael Niedermayer <michaelni@gmx.at>2014-04-26 19:21:59 +0200
commit262ea965e73eca0012b06bb06f80e7d7f54f05b6 (patch)
treed3ae7be5184b9121577f5406b36f39dfb482486f /cmdutils.c
parentb217dc91bfd5243492227fe40fd3caa01d8b0414 (diff)
downloadffmpeg-262ea965e73eca0012b06bb06f80e7d7f54f05b6.tar.gz
cmdutils: preserve unchanged log flags when setting AV_LOG_SKIP_REPEATED
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'cmdutils.c')
-rw-r--r--cmdutils.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/cmdutils.c b/cmdutils.c
index ebbbe7fc37..934fd4c74d 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -834,10 +834,17 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
};
char *tail;
int level;
+ int flags;
int i;
+ flags = av_log_get_flags();
tail = strstr(arg, "repeat");
- av_log_set_flags(tail ? 0 : AV_LOG_SKIP_REPEATED);
+ if (tail)
+ flags &= ~AV_LOG_SKIP_REPEATED;
+ else
+ flags |= AV_LOG_SKIP_REPEATED;
+
+ av_log_set_flags(flags);
if (tail == arg)
arg += 6 + (arg[6]=='+');
if(tail && !*arg)