mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-03-28 12:32:17 +02:00
cmdutils: preserve unchanged log flags when setting AV_LOG_SKIP_REPEATED
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
b217dc91bf
commit
262ea965e7
@ -834,10 +834,17 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
|||||||
};
|
};
|
||||||
char *tail;
|
char *tail;
|
||||||
int level;
|
int level;
|
||||||
|
int flags;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
flags = av_log_get_flags();
|
||||||
tail = strstr(arg, "repeat");
|
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)
|
if (tail == arg)
|
||||||
arg += 6 + (arg[6]=='+');
|
arg += 6 + (arg[6]=='+');
|
||||||
if(tail && !*arg)
|
if(tail && !*arg)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user