aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil/log.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-17 00:48:43 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-17 00:49:55 +0200
commit3ed65d98c616d52e2544c8b81aa3997f28bb88f5 (patch)
treea1a31a128ce40cf791c924cffb1ccb9479213a13 /libavutil/log.c
parent9a63a45e48acaee563a7c692a3aaaeaff67545b2 (diff)
downloadffmpeg-3ed65d98c616d52e2544c8b81aa3997f28bb88f5.tar.gz
avutil/log: fix race between setting and using the log callback
Found-by: wm4 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil/log.c')
-rw-r--r--libavutil/log.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libavutil/log.c b/libavutil/log.c
index 53be3ea4e9..5ee0c5d48f 100644
--- a/libavutil/log.c
+++ b/libavutil/log.c
@@ -268,8 +268,9 @@ void av_log(void* avcl, int level, const char *fmt, ...)
void av_vlog(void* avcl, int level, const char *fmt, va_list vl)
{
- if(av_log_callback)
- av_log_callback(avcl, level, fmt, vl);
+ void (*log_callback)(void*, int, const char*, va_list) = av_log_callback;
+ if (log_callback)
+ log_callback(avcl, level, fmt, vl);
}
int av_log_get_level(void)