diff --git a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp index 508083453dc..f85fbd06089 100644 --- a/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp +++ b/media_driver/agnostic/common/shared/mediacopy/media_vebox_copy.cpp @@ -106,12 +106,12 @@ MOS_STATUS VeboxCopyState::CopyMainSurface(PMOS_RESOURCE src, PMOS_RESOURCE dst) // Get input resource info MOS_ZeroMemory(&inputSurface, sizeof(MOS_SURFACE)); inputSurface.OsResource = *src; - GetResourceInfo(&inputSurface); + VEBOX_COPY_CHK_STATUS_RETURN(GetResourceInfo(&inputSurface)); // Get output resource info MOS_ZeroMemory(&outputSurface, sizeof(MOS_SURFACE)); outputSurface.OsResource = *dst; - GetResourceInfo(&outputSurface); + VEBOX_COPY_CHK_STATUS_RETURN(GetResourceInfo(&outputSurface)); if (!IsFormatSupported(&inputSurface)) { diff --git a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/shared/mediaDecompress/media_mem_decompress_xe_lpm_plus_base.cpp b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/shared/mediaDecompress/media_mem_decompress_xe_lpm_plus_base.cpp index aecd35bba34..8faf415f25c 100644 --- a/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/shared/mediaDecompress/media_mem_decompress_xe_lpm_plus_base.cpp +++ b/media_softlet/agnostic/Xe_M_plus/Xe_LPM_plus_base/shared/mediaDecompress/media_mem_decompress_xe_lpm_plus_base.cpp @@ -521,7 +521,7 @@ MOS_STATUS MediaMemDeCompNext_Xe_Lpm_Plus_Base::ReAllocateLinearSurface(PMOS_SUR // Pre-set to get surface info pSurface->Format = format; - GetResourceInfo(pSurface); + VPHAL_MEMORY_DECOMP_CHK_STATUS_RETURN(GetResourceInfo(pSurface)); *pbAllocated = true; return eStatus; diff --git a/media_softlet/linux/common/os/mos_graphicsresource_specific_next.cpp b/media_softlet/linux/common/os/mos_graphicsresource_specific_next.cpp index a259ea56037..af1c7aade54 100644 --- a/media_softlet/linux/common/os/mos_graphicsresource_specific_next.cpp +++ b/media_softlet/linux/common/os/mos_graphicsresource_specific_next.cpp @@ -940,7 +940,12 @@ void* GraphicsResourceSpecificNext::LockExternalResource( resource->pGmmResInfo->IsMediaMemoryCompressed(0))) { MosDecompression *mosDecompression = nullptr; - MosInterface::GetMosDecompressionFromStreamState(streamState, mosDecompression); + MOS_STATUS status = MosInterface::GetMosDecompressionFromStreamState(streamState, mosDecompression); + if (status != MOS_STATUS_SUCCESS) + { + MOS_OS_ASSERTMESSAGE("Get Mos Decompression From StreamState failed, skip lock"); + return nullptr; + } if (nullptr == mosDecompression) { MOS_OS_ASSERTMESSAGE("mosDecompression is NULL.");