[FFmpeg-cvslog] avutil/log: fix race between setting and using the log callback
Michael Niedermayer
git at videolan.org
Thu Oct 17 01:06:16 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 17 00:48:43 2013 +0200| [3ed65d98c616d52e2544c8b81aa3997f28bb88f5] | committer: Michael Niedermayer
avutil/log: fix race between setting and using the log callback
Found-by: wm4
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3ed65d98c616d52e2544c8b81aa3997f28bb88f5
---
libavutil/log.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/libavutil/log.c b/libavutil/log.c
index 53be3ea..5ee0c5d 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)
More information about the ffmpeg-cvslog
mailing list