[PATCH 3/5] amstream: Add a second critical section for filter methods that are called from streams.
Zebediah Figura (she/her)
zfigura at codeweavers.com
Wed Apr 7 10:27:33 CDT 2021
On 4/6/21 1:04 PM, Anton Baskanov wrote:
> Signed-off-by: Anton Baskanov <baskanov at 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.
More information about the wine-devel
mailing list