   DirectShow RenderFile avi 0x04a59dd8 Exception: 0xC0000005: Access violation
  IGraphBuilder *pGraphBuilder; IMediaControl *pMediaControl; IBasicVideo *pBasicVideo; IBasicAudio *pBasicAudio; IMediaSeeking *pSeek; HRESULT hr = NULL; hr = CoInitialize(NULL); hr = CoCreateInstance(CLSID_FilterGraph,NULL,CLSCTX_INPROC,IID_IGraphBuilder,(LPVOID *)&pGraphBuilder); hr = pGraphBuilder->QueryInterface(IID_IMediaControl,(LPVOID *)&pMediaControl);    hr = pMediaControl->RenderFile(L"E:\\test.avi"); hr = pGraphBuilder->QueryInterface(IID_IBasicVideo, (LPVOID *)&pBasicVideo); hr = pGraphBuilder->QueryInterface(IID_IBasicAudio, (LPVOID *)&pBasicAudio); hr = pGraphBuilder->QueryInterface(IID_IMediaSeeking, (LPVOID *)&pSeek);It won't leadto crash if I use other .avi or .wmv video files,what's wrong?Thanks.   
  Video detail info:   General Complete name : E:\test.avi Format : AVI Format/Info : Audio Video Interleave File size : 8.02 MiB Duration : 2mn 29s Overall bit rate : 449 Kbps Writing application : MEncoder Sherpya-SVN-r27081-4.2.3 Writing library : MPlayer   Video #0 ID : 0 Format : MPEG-4 Visual Format profile : Simple@L1 Format settings, BVOP : No Format settings, QPel : No Format settings, GMC : No warppoints Format settings, Matrix : Default (H.263) Codec ID : DX50 Codec ID/Hint : DivX 5 Duration : 2mn 29s Bit rate : 326 Kbps Width : 720 pixels Height : 576 pixels Display aspect ratio : 5/4 Frame rate : 25.000 fps Standard : PAL Resolution : 24 bits Colorimetry : 4:2:0 Scan type : Progressive Bits/(Pixel*Frame) : 0.031 Stream size : 5.83 MiB (73%) Writing library : Lavc51.57.2   Audio #1 ID : 1 Format : MPEG Audio Format version : Version 1 Format profile : Layer 3 Codec ID : 55 Codec ID/Hint : MP3 Duration : 2mn 29s Bit rate mode : Constant Bit rate : 96.0 Kbps Channel(s) : 2 channels Sampling rate : 32.0 KHz Resolution : 16 bits Stream size : 1.72 MiB (21%) Alignment : Aligned on interleaves   ;  What is the exact error, and what line does it occur on? It sounds like some sort of initialisation is failing and you're dereferencing a null pointer.   ;  I'd suspect a buggy codec. Try updating DivX.   ;Quote:Original post by Evil SteveWhat is the exact error, and what line does it occur on? It sounds like some sort of initialisation is failing and you're dereferencing a null pointer.hr = pMediaControl->RenderFile(L"E:\\test.avi"); //here leadto crash    //Exception: 0xC0000005: Access violation;Quote:Original post by BrighttllQuote:Original post by Evil SteveWhat is the exact error, and what line does it occur on? It sounds like some sort of initialisation is failing and you're dereferencing a null pointer.hr = pMediaControl->RenderFile(L"E:\\test.avi"); //here leadto crash    //Exception: 0xC0000005: Access violationWhat's the exact error? Access violation what? Reading? Writing? What address? What does the whole line in the debug output window say?Is that your actual code? If so, you're not checking any return values - you need to use the SUCCEEDED or FAILED macro every time you get a HRESULT return value.   