From: Santino Mazza smazza@codeweavers.com
--- dlls/evr/sample.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/evr/sample.c b/dlls/evr/sample.c index 6a1bbf564f5..c99ba3dd1b0 100644 --- a/dlls/evr/sample.c +++ b/dlls/evr/sample.c @@ -809,6 +809,7 @@ static HRESULT WINAPI sample_allocator_tracking_callback_Invoke(IMFAsyncCallback struct queued_sample *iter; IUnknown *object = NULL; IMFSample *sample = NULL; + IMFVideoSampleAllocatorNotify *callback; HRESULT hr;
if (FAILED(IMFAsyncResult_GetObject(result, &object))) @@ -834,12 +835,13 @@ static HRESULT WINAPI sample_allocator_tracking_callback_Invoke(IMFAsyncCallback }
IMFSample_Release(sample); - - if (allocator->callback) - IMFVideoSampleAllocatorNotify_NotifyRelease(allocator->callback); + callback = allocator->callback;
LeaveCriticalSection(&allocator->cs);
+ if (callback) + IMFVideoSampleAllocatorNotify_NotifyRelease(allocator->callback); + return S_OK; }