MediaSDK icon indicating copy to clipboard operation
MediaSDK copied to clipboard

Sample_encode: CEncodingPipeline::m_pUserModule useless

Open CarlG12 opened this issue 4 years ago • 2 comments

In the sample sample_encode, the class CEncodingPipeline declares a member m_pUserModule. However, it is not consumed and the memory is not freed in the Close method.

CarlG12 avatar Sep 23 '21 19:09 CarlG12

Hi, looks like it is declare with unique_ptr and that fact allows to not free it

sbalandi avatar Dec 09 '21 17:12 sbalandi

The problem is that m_pUserModule is associated m_mfxSession and m_mfxSession is closed in method CEncodingPipeline::Close(). Because m_pUserModule is not deleted, m_pUserModule is linked with an invalid session.

CarlG12 avatar Jan 12 '22 22:01 CarlG12