shithub: openh264

Download patch

ref: 17fc6bd66ef2b2390afb1614e7d62c1ccf52a375
parent: d93488448e5dc99e1cf85911be88ba879bbbecb2
author: Martin Storsjö <martin@martin.st>
date: Tue Jun 10 05:39:30 EDT 2014

Remove the unnecessary method WelsTraceModuleIsExist(), which always returned true

--- a/codec/common/inc/welsCodecTrace.h
+++ b/codec/common/inc/welsCodecTrace.h
@@ -47,11 +47,6 @@
   static void CODEC_TRACE (void* pIgnore, const int32_t kiLevel, const char* kpStrFormat, va_list vl);
 
   void SetTraceLevel (const int32_t kiLevel);
-  int32_t WelsTraceModuleIsExist();
-
- private:
-
-  int32_t m_WelsTraceExistFlag;
 
  public:
   static int32_t	m_iTraceLevel;
--- a/codec/common/src/welsCodecTrace.cpp
+++ b/codec/common/src/welsCodecTrace.cpp
@@ -58,7 +58,6 @@
   m_fpInfoTrace = welsStderrTrace<WELS_LOG_INFO>;
   m_fpWarnTrace = welsStderrTrace<WELS_LOG_WARNING>;
   m_fpErrorTrace = welsStderrTrace<WELS_LOG_ERROR>;
-  m_WelsTraceExistFlag = true;
 }
 
 welsCodecTrace::~welsCodecTrace() {
@@ -66,11 +65,6 @@
   m_fpInfoTrace = NULL;
   m_fpWarnTrace = NULL;
   m_fpErrorTrace = NULL;
-  m_WelsTraceExistFlag = false;
-}
-
-int32_t welsCodecTrace::WelsTraceModuleIsExist() {
-  return m_WelsTraceExistFlag;
 }
 
 void welsCodecTrace::TraceString (int32_t iLevel, const char* str) {
--- a/codec/decoder/plus/src/welsDecoderExt.cpp
+++ b/codec/decoder/plus/src/welsDecoderExt.cpp
@@ -102,11 +102,8 @@
 
   m_pWelsTrace	= new welsCodecTrace();
   if (m_pWelsTrace != NULL) {
-    const int32_t iWelsTraceExistingFlag = m_pWelsTrace->WelsTraceModuleIsExist();
-    if (iWelsTraceExistingFlag) {
-      m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
-      WelsSetLogCallback (welsCodecTrace::CODEC_TRACE);
-    }
+    m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
+    WelsSetLogCallback (welsCodecTrace::CODEC_TRACE);
   }
 
   WelsLog (NULL, WELS_LOG_INFO, "CWelsDecoder::CWelsDecoder() entry");
--- a/codec/encoder/plus/src/welsEncoderExt.cpp
+++ b/codec/encoder/plus/src/welsEncoderExt.cpp
@@ -172,11 +172,8 @@
 
   m_pWelsTrace	= new welsCodecTrace();
   if (m_pWelsTrace != NULL) {
-    const int32_t iWelsTraceExistingFlag = m_pWelsTrace->WelsTraceModuleIsExist();
-    if (iWelsTraceExistingFlag) {
-      m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
-      WelsSetLogCallback (welsCodecTrace::CODEC_TRACE);
-    }
+    m_pWelsTrace->SetTraceLevel (WELS_LOG_ERROR);
+    WelsSetLogCallback (welsCodecTrace::CODEC_TRACE);
   }
 }