diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_alloc.cpp b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_alloc.cpp index e6e63b8e9d..baa84ba62b 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_alloc.cpp +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_alloc.cpp @@ -55,7 +55,6 @@ IAllocation* Allocator::MakeAlloc(std::unique_ptr&& upAllo return nullptr; auto pAlloc = upAlloc.release(); - pIAlloc->m_pthis.reset(pAlloc); #define WRAP_CC(X) pIAlloc->X.Push(WrapCC(&MfxEncodeHW::ResPool::X, pAlloc)) WRAP_CC(Alloc); @@ -69,6 +68,8 @@ IAllocation* Allocator::MakeAlloc(std::unique_ptr&& upAllo WRAP_CC(UnlockAll); WRAP_CC(Acquire); + pIAlloc->m_pthis.reset(pAlloc); + return pIAlloc.release(); } diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.cpp b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.cpp index 6a165313c1..b849980eb5 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.cpp +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.cpp @@ -46,7 +46,6 @@ using namespace HEVCEHW::Base; MFXVideoENCODEH265_HW::MFXVideoENCODEH265_HW(VideoCORE& core) : m_core(core) - , m_runtimeErr(MFX_ERR_NONE) { } diff --git a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.h b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.h index c4ff704609..5a8bcc51ed 100644 --- a/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.h +++ b/_studio/mfx_lib/encode_hw/hevc/agnostic/base/hevcehw_base_impl.h @@ -119,7 +119,7 @@ namespace Base VideoCORE& m_core; TFeatureList m_features; StorageRW m_storage; - mfxStatus m_runtimeErr; + mfxStatus m_runtimeErr = MFX_ERR_NONE; mfxStatus Execute(mfxThreadTask task, mfxU32 uid_p, mfxU32 uid_a); mfxStatus FreeResources(mfxThreadTask task, mfxStatus sts);