Browse Source

avutil/log: fix race between setting and using the log callback

Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.1
Michael Niedermayer 12 years ago
parent
commit
3ed65d98c6
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      libavutil/log.c

+ 3
- 2
libavutil/log.c View File

@@ -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)


Loading…
Cancel
Save