Jump to content
  • Advertisement
Sign in to follow this  
odyodyodys

Removing VMR9 filter Fails

This topic is 4028 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!