Problem in openinga video file?

AndersenWu1 used Ask the Experts™
I use IMediaDet to open a video source file,source code as follows:

IMediaDet          *pDet;
hr = CoCreateInstance(CLSID_MediaDet, NULL, CLSCTX_INPROC_SERVER,IID_IMediaDet,(void **)&pDet);
if(hr == S_OK)

When I open a source file,such as "media.c",an ASSERT error message box will be shown when executed at line:hr=pDet->put_Filename(wFilename);

I think there should be no assert message box displayed,as if a file is an invalid video source,the returned value can indicate the fail status.

I need some body to kindly tell me how can I know if a file is an openable video/audio file?

Thanks very much
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
When using the release build of DirectShow, those assert messages will not be displayed.   Just ignore them if you know what it causing it.
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Post your closing recommendations!  No comment means you don't care.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial