diff --git a/codec/decoder/plus/src/welsDecoderExt.cpp b/codec/decoder/plus/src/welsDecoderExt.cpp index 902ac4a1..0d03db6d 100644 --- a/codec/decoder/plus/src/welsDecoderExt.cpp +++ b/codec/decoder/plus/src/welsDecoderExt.cpp @@ -110,23 +110,23 @@ CWelsDecoder::CWelsDecoder (void_t) iBufUsedSize += WelsSnprintf (chFileNameSize, iBufLeftSize, "size_0x%p_", (void_t*)this); iBufLeft -= iBufUsed; - if (iBufLeft > iBufUsed) { + if (iBufLeft > 0) { iBufUsed += WelsStrftime (&chFileName[iBufUsed], iBufLeft, "%y%m%d%H%M%S", &sCurTime); iBufLeft -= iBufUsed; } iBufLeftSize -= iBufUsedSize; - if (iBufLeftSize > iBufUsedSize) { + if (iBufLeftSize > 0) { iBufUsedSize += WelsStrftime (&chFileNameSize[iBufUsedSize], iBufLeftSize, "%y%m%d%H%M%S", &sCurTime); iBufLeftSize -= iBufUsedSize; } - if (iBufLeft > iBufUsed) { + if (iBufLeft > 0) { iBufUsed += WelsSnprintf (&chFileName[iBufUsed], iBufLeft, ".%03.3u.264", WelsGetMillsecond (&sCurTime)); iBufLeft -= iBufUsed; } - if (iBufLeftSize > iBufUsedSize) { + if (iBufLeftSize > 0) { iBufUsedSize += WelsSnprintf (&chFileNameSize[iBufUsedSize], iBufLeftSize, ".%03.3u.len", WelsGetMillsecond (&sCurTime)); iBufLeftSize -= iBufUsedSize; diff --git a/codec/encoder/plus/src/welsEncoderExt.cpp b/codec/encoder/plus/src/welsEncoderExt.cpp index 4e94dbf4..fe236c05 100644 --- a/codec/encoder/plus/src/welsEncoderExt.cpp +++ b/codec/encoder/plus/src/welsEncoderExt.cpp @@ -132,7 +132,7 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() iBufferLeft -= iBufferUsed; - if (iBufferLeft > iBufferUsed) { + if (iBufferLeft > 0) { #if defined(_GNUC__) iBufferUsed += strftime (&strStreamFileName[iBufferUsed], iBufferLeft, "%y%m%d%H%M%S", tTimeNow); #else @@ -150,7 +150,7 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() } iBufferLeftSize -= iBufferUsedSize; - if (iBufferLeftSize > iBufferUsedSize) { + if (iBufferLeftSize > 0) { #if defined(_GNUC__) iBufferUsedSize += strftime (&strLenFileName[iBufferUsedSize], iBufferLeftSize, "%y%m%d%H%M%S", tTimeNow); #else @@ -167,7 +167,7 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() iBufferLeftSize -= iBufferUsedSize; } - if (iBufferLeft > iBufferUsed) { + if (iBufferLeft > 0) { #ifdef _WIN32 #if defined(_MSC_VER) #if _MSC_VER>=1500 @@ -182,7 +182,7 @@ CWelsH264SVCEncoder::CWelsH264SVCEncoder() iBufferLeft -= iBufferUsed; } - if (iBufferLeftSize > iBufferUsedSize) { + if (iBufferLeftSize > 0) { #ifdef _WIN32 #if defined(_MSC_VER) #if _MSC_VER>=1500