Showing the changes to codec/decoder/plus/src/welsCodecTrace.cpp (1 of 2 files). Show all
Unified · Split
| @@ -59,19 +59,14 @@ int32_t CWelsTraceBase::SetTraceLevel (int iLevel) { · 58 unmodified lines | ||
| 59 | 59 | |
| 60 | 60 | int32_t CWelsTraceBase::Trace (const int kLevel, const str_t* kpFormat, va_list pVl) { |
| 61 | 61 | if (kLevel & m_iLevel) { |
| 62 | − str_t chWStrFormat[MAX_LOG_SIZE] = {0}; | |
| 63 | 62 | str_t chBuf[MAX_LOG_SIZE] = {0}; |
| 64 | − str_t chResult[MAX_LOG_SIZE] = {0}; | |
| 65 | 63 | const int32_t kLen = WelsStrnlen ((const str_t*)"[DECODER]: ", MAX_LOG_SIZE); |
| 66 | 64 | |
| 67 | − WelsStrncpy (chWStrFormat, MAX_LOG_SIZE, (const str_t*)kpFormat, WelsStrnlen ((const str_t*)kpFormat, MAX_LOG_SIZE)); | |
| 68 | − | |
| 69 | 65 | WelsStrncpy (chBuf, MAX_LOG_SIZE, (const str_t*)"[DECODER]: ", kLen); |
| 70 | 66 | |
| 71 | 67 | WelsVsnprintf ((chBuf + kLen), MAX_LOG_SIZE - kLen, (const str_t*)kpFormat, pVl); |
| 72 | − WelsStrncpy (chResult, MAX_LOG_SIZE, (const str_t*)chBuf, WelsStrnlen ((const str_t*)chBuf, MAX_LOG_SIZE)); | |
| 73 | 68 | |
| 74 | − WriteString (kLevel, chResult); | |
| 69 | + WriteString (kLevel, chBuf); | |
| 75 | 70 | } |
| 76 | 71 | |
| 77 | 72 | return 0; |