owt-client-native icon indicating copy to clipboard operation
owt-client-native copied to clipboard

`mfxSession` close twice

Open Meonardo opened this issue 2 years ago • 0 comments

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.

Meonardo avatar May 25 '22 09:05 Meonardo