From 6aba2312c746b86341f6aa634516f2d32197c419 Mon Sep 17 00:00:00 2001 From: zhanghongran Date: Wed, 24 May 2023 06:14:13 +0000 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E9=A3=8E?= =?UTF-8?q?=E6=A0=BC=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zhanghongran --- frameworks/native/common/avcodec_errors.cpp | 2 +- services/engine/source/source.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/frameworks/native/common/avcodec_errors.cpp b/frameworks/native/common/avcodec_errors.cpp index d74c52930..c42f9a8d7 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 288fe4d4b..c2714d60a 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)); -- Gitee