views:

62

answers:

1

I am writing a DirectShow capture filter using CSource / CSourceStream as a base but when I access the cam in Firefox + Flash, I get a debug assert and the following debug error when closing Firefox.

Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    ID             Object Description
Cam6.ax(tid 1c98)   133506 : 
Cam6.ax(tid 1c98)   133506 :    19 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :    18 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 :     6 (001AE940)          Camera Stream
Cam6.ax(tid 1c98)   133507 :     5 (001AE940)                 Camera
Cam6.ax(tid 1c98)   133507 : 
Cam6.ax(tid 1c98)   133507 : Total object count     4

From what I can tell this is not my fault. I suspect Flash is uncleanly discarding the DirectShow graph on shutdown. I have read and re-read the MSDN documentation and scoured the net for examples but turned up nothing.

Can anyone help clarify this for me or point me in the right direction?

A: 

Feeling a little silly about this. After spending a day looking at reference counts and whatnot, it turned out to be a noobie mistake. I compiled strbasd.lib with the /MDd flag and my code with the /MD flag. The former was targeting the debug runtime libraries, the later the release runtime libraries.

The linker gave a warning which went unheeded and the code ran up until time to release the DLL. Go figure..

Chalk that one up to stupidity I guess. :)

Aaron