evr/sample: Use proper locking method for SetAllocator().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2022-05-22 17:07:35 +03:00 committed by Alexandre Julliard
parent 5aa05728a5
commit 2686550a99

View file

@ -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;
}