mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-22 06:50:12 +01:00
fftools/opt_common: add time and datetime log flags
This commit adds two logging flags: 'time' and 'datetime'. Usage: ffmpeg -loglevel +time or ffmpeg -loglevel +datetime Signed-off-by: softworkz <softworkz@hotmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
committed by
Michael Niedermayer
parent
c79cdae377
commit
9fd23f712a
@@ -1292,6 +1292,18 @@ int opt_loglevel(void *optctx, const char *opt, const char *arg)
|
||||
} else {
|
||||
flags |= AV_LOG_PRINT_LEVEL;
|
||||
}
|
||||
} else if (av_strstart(token, "time", &arg)) {
|
||||
if (cmd == '-') {
|
||||
flags &= ~AV_LOG_PRINT_TIME;
|
||||
} else {
|
||||
flags |= AV_LOG_PRINT_TIME;
|
||||
}
|
||||
} else if (av_strstart(token, "datetime", &arg)) {
|
||||
if (cmd == '-') {
|
||||
flags &= ~AV_LOG_PRINT_DATETIME;
|
||||
} else {
|
||||
flags |= AV_LOG_PRINT_DATETIME;
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user