MPEG Audio Decoder hangs


I have encountered a strange hang in the MPEG Audio Decoder DirectShow
filter. When running my application normally, everything works fine.
However, when another instance of my application is running and processing
one file, starting another instance to process a new file hangs. I get a few
audio samples passed through my graph, then the Receive() call on the MPEG
Audio Decoder hangs. It doesn't even return when the first instance has
finished and there is no CPU load anymore.

What's even stranger is that running a simple "while(1);" program does NOT
cause the same behaviour. In this case, my application just works very
slowly, but it works. It is only when the same application is doing the same
kind of processing that this hang happens. And no, my application does not
use any inter-process synchronization.

My application is a DirectShow application built with Visual C++ 6.0. I have
DirectX 9.0c installed. The graph consists of several custom-made filters.
When hung, the stack of the thread that calls Receive() on the Audio
Decoder's input pin look as follows:

NTDLL! 7c90eb94()
KERNEL32! 7c802542()
QUARTZ! 7484a8b0()
QUARTZ! 7482e64d()
QUARTZ! 748d0c3f()
QUARTZ! 74830936()
QUARTZ! 74868754()
COutputQueue::ReceiveMultiple(IMediaSample * * 0x1177fbb4, long 1, long *
0x1177fba8) line 653 + 38 bytes
COutputQueue::Receive(IMediaSample * 0x1004b9e8) line 579
CDemuxOutputPin::Deliver(IMediaSample * 0x1004b9e8) line 1958 + 18 bytes

I believe this means the problem is inside MPEG Audio Decoder. The KERNEL32
function is WaitForSingleObjectEx() which apparently never returns.

When running the same input file through my application a second time
without another instance running, it works fine again.

Any ideas are welcome!


Mikko Noromaa (mikkon@xxxxxxxxxxxx)
- SQL in Excel, check out ExcelSQL! - see -