Signed-off-by: Nikolay Sivov nsivov@codeweavers.com ---
In attempt to get rid of crashes on XP, and occasionally on Vista. Patch applies on master as well as a part of earlier sent series of 6.
dlls/mfplat/tests/mfplat.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index b66c54a374..eb9e3b435c 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -1449,16 +1449,19 @@ static HRESULT WINAPI testcallback_Invoke(IMFAsyncCallback *iface, IMFAsyncResul
hr = IMFMediaEventQueue_GetEvent(queue, 0, &event); ok(hr == MF_E_MULTIPLE_SUBSCRIBERS, "Failed to get event, hr %#x.\n", hr); - }
- hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event); - ok(hr == S_OK, "Failed to finalize GetEvent, hr %#x.\n", hr); + hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event); + ok(hr == S_OK, "Failed to finalize GetEvent, hr %#x.\n", hr); + + hr = IMFMediaEventQueue_EndGetEvent(queue, result, &event); + ok(hr == E_FAIL, "Unexpected result, hr %#x.\n", hr); + + IMFMediaEvent_Release(event); + }
hr = IMFAsyncResult_GetObject(result, &obj); ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
- IMFMediaEvent_Release(event); - IMFMediaEventQueue_Release(queue);
SetEvent(callback->event);