1

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:

  1. picturepush.com/public/8931745 - Full graph - +6 Mb grow up Private bytes every time after playback
  2. picturepush.com/public/8931760 - With DMO convertor, Without samplegrabber - no memory leak
  3. picturepush.com/public/8931766 - With DMO convertor, Without samplegrabber, but with video renderer - +7 Mb grow up Private bytes every time after playback
  4. picturepush.com/public/8931770 - Only decoder - no memory leak
Survarium
  • 190
  • 2
  • 6
  • How do you measure it? Does it hit limit and the application fails completely (should be pretty soon at this rate)? What if you connect decoder output to `Null Renderer` directly, is the leak still here? – Roman R. Aug 08 '12 at 12:13
  • 1
    check this one http://stackoverflow.com/questions/11086415/h-264-frames-memory-leak-with-some-decoders but I am not sure if it is relevant. – Andrey Aug 08 '12 at 12:14

0 Answers0