From 7c7c5b24152d2d7e70a416019b7076f61487844e Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 10 May 2012 19:11:23 +0200 Subject: [PATCH] avutil/log: allow av_log_set_callback (NULL) Idea-by: Don Moir Signed-off-by: Michael Niedermayer --- libavutil/log.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libavutil/log.c b/libavutil/log.c index 5e2b14bbca..fbe9ea0a68 100644 --- a/libavutil/log.c +++ b/libavutil/log.c @@ -165,7 +165,8 @@ void av_log(void* avcl, int level, const char *fmt, ...) void av_vlog(void* avcl, int level, const char *fmt, va_list vl) { - av_log_callback(avcl, level, fmt, vl); + if(av_log_callback) + av_log_callback(avcl, level, fmt, vl); } int av_log_get_level(void)