Sign in to follow this  

Removing VMR9 filter Fails

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi all, I'm trying to find a leak in my media player. It uses DirectShow in windowless mode. No direct3d is used. For mixing videos I used VMR9. At the moment only one video can play at the time. My problem is that when I try to close interfaces, although everything seems to be working perfect, at the remove filter loop the "VMR9" filter fails to released.

IEnumFilters *pEnum = NULL;
HRESULT hr_ = graphBuilder->EnumFilters(&pEnum);

while (S_OK == pEnum->Next(1, &pFilter, NULL))
{
   // Remove the filter.			
   hr = graphBuilder->RemoveFilter(pFilter);
				
   // Reset the enumerator.
   hr = pEnum->Reset();
   hr = pFilter->Release();
}

hr = pEnum->Release();



All filters return S_OK on Reset(). All filters return S_OK on Release() Exept "VMR9", which comes 2nd in the loop. Afterwards, I release the rest of the objects:
   // Release and zero DirectShow interfaces
   SAFE_RELEASE(mediaEventEx);
   SAFE_RELEASE(mediaSeeking);
   SAFE_RELEASE(mediaControl);
   SAFE_RELEASE(basicAudio);
   SAFE_RELEASE(vmr9WindowControl);
   SAFE_RELEASE(vmr9MixerBitmap);
   SAFE_RELEASE(graphBuilder);


I beleave there is a leak in this... Please help me on this!

Share this post


Link to post
Share on other sites

This topic is 3661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this