summaryrefslogtreecommitdiff
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-21 15:32:24 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-01-22 18:41:46 +0100
commit07b3dbbbb2c6545791a8ca6d0123c824b146e4ce (patch)
treec8e2529a87d8e7d336304e2d5945614d53f70e97 /libavutil/log.c
parent7b7f97532b2ac8836d8d8e3c71dd026e35ae1ca7 (diff)
avutil/log: Move log_level_offset_offset code from av_log() to v_log()
Suggested-by: Anton Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index e8a0db7716..c3e65f0470 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -362,19 +362,19 @@ static void (*av_log_callback)(void*, int, const char*, va_list) =
void av_log(void* avcl, int level, const char *fmt, ...)
{
- AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
va_list vl;
va_start(vl, fmt);
- if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) &&
- avc->log_level_offset_offset && level >= AV_LOG_FATAL)
- level += *(int *) (((uint8_t *) avcl) + avc->log_level_offset_offset);
av_vlog(avcl, level, fmt, vl);
va_end(vl);
}
void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
{
+ AVClass* avc = avcl ? *(AVClass **) avcl : NULL;
void (*log_callback)(void*, int, const char*, va_list) = av_log_callback;
+ if (avc && avc->version >= (50 << 16 | 15 << 8 | 2) &&
+ avc->log_level_offset_offset && level >= AV_LOG_FATAL)
+ level += *(int *) (((uint8_t *) avcl) + avc->log_level_offset_offset);
if (log_callback)
log_callback(avcl, level, fmt, vl);
}