Skip to content
Snippets Groups Projects
Commit 262ea965 authored by tue46wsdgxfjrt's avatar tue46wsdgxfjrt Committed by Michael Niedermayer
Browse files

cmdutils: preserve unchanged log flags when setting AV_LOG_SKIP_REPEATED

parent b217dc91
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment