lame.ax
When the IAMStreamConfig::GetStreamCaps() is called, the filter crashes because of the unitialized variable "m_mt" if the output pin is not connected. m_mt represents the connection mediatype of the output pin, however the pin can be not connected when GetStreamCaps() is called.
I am not trying to justify the crash but your methodology is incorrect. The compressor output pins need to be rendered *before* you set the compression parameters or call GetStreamCaps().
Joe Flynn
There is no such restrictions in a documentation. Here is what the documentation says:
"Filters implement the IAMStreamConfig::SetFormat method to set the audio or video format before the filter's pins are connected. If your output pin is already connected and you can provide a new type, then reconnect your pin..."
The GetStreamCaps() is called before SetFormat(). That means there is no need to have a connected pin.