c771f173
by Brendan McGrath at 2026-05-11T16:23:12+02:00
mf: Call GetCorrelatedTime without critical section.
When SAR is the time source, the call to GetCorrelatedTime will result
in an attempt to acquire SAR's critical section. This means this thread
will hold the presentation clock critical section and then attempt
to obtain SARs critical section.
However, if SAR is in the process of shutdown in a parallel thread, then
that thread will already hold the SAR critical section and call
IMFPresentationClock::RemoveClockStateSink. This will attempt to acquire
the presentation clock critical section.
In other words, we have two threads trying to acquire the same two
critical sections in the opposite order. The result is both threads
waiting on the other and thus a deadlock.
This commit resolves the deadlock by ensuring the presentation clock
does not hold its own critical section when calling GetCorrelatedTime.