During rendering h.264 at AVI container video file memory consumption of my application rising with big speed, aroud 150 Mb/min.
This is the link for image of my graph: http://picturepush.com/public/8926555
If using LAV video decoder insted - no memory leak.
First I suggest, that leak happened at my code, but than i just switch off (set "return S_OK" at the start of callback") both my sample grabbers filter - the leak continue.
Also i tried to relese every filter after stop graph like this, but this no delete leak:
if(m_pMediaControl)
{
HRESULT hr = m_pMediaControl->Stop();
LONG lCount;
IUnknown* pUnk;
IAMCollection* p_Collection;
hr = m_pMediaControl->get_FilterCollection(reinterpret_cast<IDispatch**>(&p_Collection));
hr = p_Collection->get_Count(&lCount);
for (int i=0; i<lCount; i++)
{
hr = p_Collection->Item(i, &pUnk);
pUnk->Release();
}
p_Collection->Release();
}
m_pMediaControl.Release();
Will be happy for any suugestions, how to eliminate memory leak?
I create different graphs at graphedit and observed for repetead playback short (6 sec) h.264 video file:
- picturepush.com/public/8931745 - Full graph - +6 Mb grow up Private bytes every time after playback
- picturepush.com/public/8931760 - With DMO convertor, Without samplegrabber - no memory leak
- picturepush.com/public/8931766 - With DMO convertor, Without samplegrabber, but with video renderer - +7 Mb grow up Private bytes every time after playback
- picturepush.com/public/8931770 - Only decoder - no memory leak