Put loglevel check in RTMP_Log
authorHoward Chu <hyc@highlandsun.com>
Mon, 14 Dec 2015 17:36:07 +0000 (17:36 +0000)
committerHoward Chu <hyc@highlandsun.com>
Mon, 14 Dec 2015 17:36:07 +0000 (17:36 +0000)
librtmp/log.c

index 0012985..1b52000 100644 (file)
@@ -92,6 +92,10 @@ RTMP_LogLevel RTMP_LogGetLevel()
 void RTMP_Log(int level, const char *format, ...)
 {
        va_list args;
+
+       if ( level > RTMP_debuglevel )
+               return;
+
        va_start(args, format);
        cb(level, format, args);
        va_end(args);