mfplat: Avoid a race condition when releasing a tracked sample.
commitb1807751219e256867eaac5cc4d8b97a5482978f
authorGiovanni Mascellani <gmascellani@codeweavers.com>
Tue, 3 May 2022 13:06:43 +0000 (3 15:06 +0200)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 4 May 2022 19:27:25 +0000 (4 21:27 +0200)
treeb5a1c2dfab5fe2042cc0dea7ad71e4b1a3cdc41d
parent0c35a851cd73247cb95187acc2e22074f9ca09a3
mfplat: Avoid a race condition when releasing a tracked sample.

Right now, if the same tracked sample is released at the same time
from two different threads it might happen that neither of them calls
the callback, because they might go through the critical section at
the same time (while neither has decremented the reference count yet).

Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
dlls/mfplat/sample.c