diff --git a/frameworks/innerkitsimpl/converter/src/post_proc.cpp b/frameworks/innerkitsimpl/converter/src/post_proc.cpp index f0202327b7ecc9250e914c5bd35efbe4d24edfe9..412b7904cdbf882e5b9fbdcd76bf0d2d37c22ade 100644 --- a/frameworks/innerkitsimpl/converter/src/post_proc.cpp +++ b/frameworks/innerkitsimpl/converter/src/post_proc.cpp @@ -1196,7 +1196,8 @@ bool PostProc::ScalePixelMapEx(const Size &desiredSize, PixelMap &pixelMap, cons desiredSize.width * ImageUtils::GetPixelBytes(imgInfo.pixelFormat); void *inBuf = nullptr; - if (srcWidth % HALF != 0 && pixelMap.GetAllocatorType() == AllocatorType::SHARE_MEM_ALLOC) { + if (srcWidth % HALF != 0 && + (pixelMap.GetAllocatorType() == AllocatorType::SHARE_MEM_ALLOC || pixelMap.GetNoPaddingUsage())) { // Workaround for crash on odd number width, caused by FFmpeg 5.0 upgrade uint64_t byteCount = static_cast(srcRowStride[0]) * static_cast(srcHeight); uint64_t allocSize = static_cast(srcWidth + 1) * static_cast(srcHeight) *