owt-client-native
owt-client-native copied to clipboard
`mfxSession` close twice
Hi, owt team,
recently I got a crash while using hardware acceleration features by setting SetVideoHardwareAccelerationEnabled to true.
I found: below 2 members
// Begin MSDK variables
MFXVideoSession* m_mfx_session_;
std::unique_ptr<MFXVideoDECODE> m_pmfx_dec_;
in class MSDKVideoDecoder,
AfterMSDKVideoDecoder::Release() is called, in MSDKFactory::DestroySession() the m_mfx_session_ will be deleted, so mfxSession in MFXVideoSession will be closed,
the problem is: the SAME mfxSession object which is also in MFXVideoDECODE get refered when MSDKVideoDecoder::~MSDKVideoDecoder() is called, so I got "Access Violation" exception.