Don't format libass messages which won't be logged

Originally committed to SVN as r4807.
This commit is contained in:
Thomas Goyne 2010-10-11 20:48:29 +00:00
parent ef7abaf1b6
commit f4577a8b3a
1 changed files with 2 additions and 1 deletions

View File

@ -64,6 +64,7 @@
/// @brief Handle libass messages
///
static void msg_callback(int level, const char *fmt, va_list args, void *data) {
if (level >= 7) return;
char buf[1024];
#ifdef _WIN32
vsprintf_s(buf, sizeof(buf), fmt, args);
@ -73,7 +74,7 @@ static void msg_callback(int level, const char *fmt, va_list args, void *data) {
if (level < 2) // warning/error
LOG_I("subtitle/provider/libass") << buf;
else if (level < 7) // verbose
else // verbose
LOG_D("subtitle/provider/libass") << buf;
}