diff --git a/frameworks/native/common/avcodec_errors.cpp b/frameworks/native/common/avcodec_errors.cpp index d74c529301fe69e45a2a06bae17a0b4de6214314..c42f9a8d78ea3148d859d67aed7517ab2e8de962 100644 --- a/frameworks/native/common/avcodec_errors.cpp +++ b/frameworks/native/common/avcodec_errors.cpp @@ -133,7 +133,7 @@ std::string ErrorMessageOk(const std::string& param1, const std::string& param2) std::string ErrorMessageNoPermission(const std::string& param1, const std::string& param2) { - std::string message = "Try to do " + param1 + " failed. User should request permission " + param2 +" first."; + std::string message = "Try to do " + param1 + " failed. User should request permission " + param2 + " first."; return message; } diff --git a/services/engine/source/source.cpp b/services/engine/source/source.cpp index 288fe4d4bb3115d717d1d093b1625d888e6e8eb4..c2714d60a8106d7a6b076fab670a572275404f47 100644 --- a/services/engine/source/source.cpp +++ b/services/engine/source/source.cpp @@ -38,7 +38,7 @@ namespace Plugin { namespace { constexpr OHOS::HiviewDFX::HiLogLabel LABEL = {LOG_CORE, LOG_DOMAIN, "Source"}; - inline bool FileIsExists (const char* name) + inline bool FileIsExists(const char* name) { struct stat buffer; return (stat(name, &buffer) == 0); @@ -565,10 +565,10 @@ int Source::AVReadPacket(void *opaque, uint8_t *buf, int bufSize) customIOContext->offset, customIOContext->fileSize); return AVCS_ERR_SEEK_FAILED; } - if (static_cast(customIOContext->offset+bufSize) > customIOContext->fileSize) { + if (static_cast(customIOContext->offset + bufSize) > customIOContext->fileSize) { readSize = customIOContext->fileSize - customIOContext->offset; } - if (buf!=nullptr && bufferVector->GetMemory()!=nullptr) { + if (buf != nullptr && bufferVector->GetMemory() != nullptr) { auto memSize = static_cast(bufferVector->GetMemory()->GetCapacity()); readSize = (readSize > memSize) ? memSize : readSize; } @@ -589,7 +589,7 @@ int Source::AVReadPacket(void *opaque, uint8_t *buf, int bufSize) customIOContext->offset += rtv; customIOContext->position += rtv; } else if (static_cast(result) == 1) { - customIOContext->eof=true; + customIOContext->eof = true; rtv = AVERROR_EOF; } else { AVCODEC_LOGE("AVReadPacket failed with rtv = %{public}d", static_cast(result));