2006-10-17 09:14:02 UTC
I have written a demux filter for a custom file format, along with
corresponding transform filters. I am using File Async filter as source
filter. All the filters work fine when I choose the file of correct
However, when I select a file of different format, even then my demux
filter is being selected.
MyDemuxInputPin::CheckMediaType returns error 2 times but I don't
understand how, the third time it returns S_OK.
Please let me know if you have any hint as to what's happening. I have
appended main function snippets below...
const AM_MEDIA_TYPE *pmt
return CBaseInputPin::ReceiveConnection(pConnector, pmt);
HRESULT MyDemuxInputPin::CheckMediaType(const CMediaType* pmt)
// I get media type and sub type from pmt
const GUID* pType = pmt->Type();
const GUID* pSubType = pmt->Subtype();
if(*pType == MEDIATYPE_Stream && *pSubType == MEDIASUBTYPE_MYTYPE)
HRESULT MyDemuxInputPin::GetMediaType(int iPosition, CMediaType*
//check for iPosition here...
if(iPosition == 0)