From 1273cb863ca1bef275e9eb677b10b8a9f8d7d0e2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Fri, 23 Nov 2018 13:04:46 -0500 Subject: [PATCH] send logPrint a pre-formatted string --- src/zm_ffmpeg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/zm_ffmpeg.cpp b/src/zm_ffmpeg.cpp index a153dad10..d0bac6464 100644 --- a/src/zm_ffmpeg.cpp +++ b/src/zm_ffmpeg.cpp @@ -56,7 +56,9 @@ void log_libav_callback( void *ptr, int level, const char *fmt, va_list vargs ) } if ( log ) { - log->logPrint(false, __FILE__, __LINE__, log_level, fmt, vargs); + char logString[8192]; + vsnprintf(logString, sizeof(logString)-1, fmt, vargs); + log->logPrint(false, __FILE__, __LINE__, log_level, logString); } }