libbluray | branch: master | hpi1 <[email protected]> | Thu May 4 12:14:09 2017 +0300| [8d739e88df1ac337e949c4bb01852a8ed5de895f] | committer: hpi1
Fix check for app-provided log function > http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8d739e88df1ac337e949c4bb01852a8ed5de895f --- src/util/logging.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/logging.c b/src/util/logging.c index 62e6b59f..94ef131e 100644 --- a/src/util/logging.c +++ b/src/util/logging.c @@ -84,6 +84,7 @@ void bd_debug(const char *file, int line, uint32_t mask, const char *format, ... char buffer[4096]; va_list args; int len, len2; + BD_LOG_FUNC lf; len = sprintf(buffer, "%s:%d: ", f ? f + 1 : file, line); if (len < 0) { @@ -97,10 +98,10 @@ void bd_debug(const char *file, int line, uint32_t mask, const char *format, ... if (len2 < 0) { return; } - - if (log_func) { + lf = log_func; + if (lf) { buffer[sizeof(buffer)-1] = 0; - log_func(buffer); + lf(buffer); } else { len += len2; _______________________________________________ libbluray-devel mailing list [email protected] https://mailman.videolan.org/listinfo/libbluray-devel
