diff options
Diffstat (limited to 'libavutil/log.c')
-rw-r--r-- | libavutil/log.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libavutil/log.c b/libavutil/log.c index 78e703b9e9..8d4945249e 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -412,6 +412,15 @@ void av_log(void* avcl, int level, const char *fmt, ...) va_end(vl); } +void av_log_once(void* avcl, int initial_level, int subsequent_level, int *state, const char *fmt, ...) +{ + va_list vl; + va_start(vl, fmt); + av_vlog(avcl, *state ? subsequent_level : initial_level, fmt, vl); + va_end(vl); + *state = 1; +} + void av_vlog(void* avcl, int level, const char *fmt, va_list vl) { AVClass* avc = avcl ? *(AVClass **) avcl : NULL; |