Nikolay Sivov : evr/sample: Use proper locking method for SetAllocator().
Module: wine Branch: master Commit: 2686550a9919d4af1909b29c5232cedad439c87f URL: https://source.winehq.org/git/wine.git/?a=commit;h=2686550a9919d4af1909b29c5... Author: Nikolay Sivov <nsivov(a)codeweavers.com> Date: Sun May 22 17:07:35 2022 +0300 evr/sample: Use proper locking method for SetAllocator(). Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- dlls/evr/sample.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 3521e6c4d51..f03292704b5 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -1446,8 +1446,7 @@ static HRESULT WINAPI tracked_video_sample_SetAllocator(IMFTrackedSample *iface, TRACE("%p, %p, %p.\n", iface, sample_allocator, state); - IMFSample_LockStore(sample->sample); - + EnterCriticalSection(&sample->cs); if (sample->tracked_result) hr = MF_E_NOTACCEPTING; else @@ -1464,8 +1463,7 @@ static HRESULT WINAPI tracked_video_sample_SetAllocator(IMFTrackedSample *iface, } } } - - IMFSample_UnlockStore(sample->sample); + LeaveCriticalSection(&sample->cs); return hr; }
participants (1)
-
Alexandre Julliard