On 4/6/21 1:04 PM, Anton Baskanov wrote:
Signed-off-by: Anton Baskanov baskanov@gmail.com
This is required to avoid deadlocks, e.g. when the filter is stopped while EndOfStream is being called.
So, if I understand correctly, the race is:
Main thread Streaming thread ------------------------------------------------ IMediaControl::Stop() IPin::EndOfStream() lock graph->cs IMediaStreamFilter::EndOfStream() stop parser filter wait for streaming thread try to grab graph->cs
Shouldn't patch 0005 be enough to avoid this? We don't hold filter->cs, or any amstream-specific locks, while waiting for streaming threads to stop.