shithub: openh264

Download patch

ref: cfc9367610a567a20f08080fec0012fb4dc0b86b
parent: 90be3d8215c104bedc6027f881abd81c78ad27e2
author: Martin Storsjö <[email protected]>
date: Tue Jun 10 07:40:38 EDT 2014

Remove WelsStderrSetTraceLevel

The logging level is checked in welsCodecTrace anyway.

Previously, error logging wasn't ever shown if the trace
level was set to WELS_LOG_ERROR (as it was by default),
since welsStderrLevelTrace required the message level to
be strictly lower than the trace level.

--- a/codec/common/inc/logging.h
+++ b/codec/common/inc/logging.h
@@ -35,9 +35,6 @@
 #ifndef WELS_LOGGING_H__
 #define WELS_LOGGING_H__
 
-// API surface.
-void WelsStderrSetTraceLevel (int32_t level);
-
 
 // Internal details.
 int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap);
--- a/codec/common/src/logging.cpp
+++ b/codec/common/src/logging.cpp
@@ -35,15 +35,7 @@
 #include <stdio.h>
 #include "typedefs.h"
 
-static int32_t g_TraceLevel = 0;
-
-void WelsStderrSetTraceLevel (int32_t level) {
-  g_TraceLevel = level;
-}
-
 int32_t welsStderrLevelTrace (int32_t level, const char* format, va_list ap) {
-  if (level < g_TraceLevel) {
-    vfprintf (stderr, format, ap);
-  }
+  vfprintf (stderr, format, ap);
   return 0;
 }
--- a/codec/common/src/welsCodecTrace.cpp
+++ b/codec/common/src/welsCodecTrace.cpp
@@ -108,7 +108,6 @@
 void welsCodecTrace::SetTraceLevel (const int32_t iLevel) {
   if (iLevel >= 0)
     m_iTraceLevel	= iLevel;
-  WelsStderrSetTraceLevel (iLevel);
 }