DirectShow code crashes after exit (PushSourceDesktop sample)
I'm trying to use the Desktop capture filter that comes with the SDK (PushSourceDesktop). I compiled it and seem to use it successfully as it actually captures my desktop and saves it to a file. But the application crashes when its done/exits. When I break on the error it only says no source available and the call stack location is KernelBase.dll!7560280C(). I thought I give it a shot here to see if anyone can recognize some issue or if I am doing something blatantly wrong that might cause the crash. Thanks in advance! EDIT: working code int main() { HRESULT hr; hr = CoInitialize(NULL); {