Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/tests/evr.c | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-)
diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 31434bde43a..94bf327dd92 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -1422,17 +1422,14 @@ static void test_MFCreateVideoSampleAllocator(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(count == 4, "Unexpected count %d.\n", count);
- hr = IMFSample_QueryInterface(sample, &IID_IMFDesiredSample, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); - - hr = IMFSample_QueryInterface(sample, &IID_IMFTrackedSample, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); + check_interface(sample, &IID_IMFDesiredSample, TRUE); + check_interface(sample, &IID_IMFTrackedSample, TRUE);
hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ check_interface(buffer, &IID_IMF2DBuffer, TRUE); + hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMFGetService, (void **)&gs); ok(hr == S_OK || broken(hr == E_NOINTERFACE) /* Win7 */, "Unexpected hr %#x.\n", hr);
@@ -1444,10 +1441,6 @@ static void test_MFCreateVideoSampleAllocator(void) IMFGetService_Release(gs); }
- hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); - IMFMediaBuffer_Release(buffer);
IMFSample_Release(sample); @@ -1489,14 +1482,15 @@ static void test_MFCreateVideoSampleAllocator(void) hr = IMFVideoSampleAllocator_AllocateSample(allocator, &sample); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ check_interface(sample, &IID_IMFTrackedSample, TRUE); + check_interface(sample, &IID_IMFDesiredSample, TRUE); + hr = IMFSample_GetBufferByIndex(sample, 0, &buffer); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
check_service_interface(buffer, &MR_BUFFER_SERVICE, &IID_IDirect3DSurface9, TRUE); - - hr = IMFMediaBuffer_QueryInterface(buffer, &IID_IMF2DBuffer, (void **)&unk); - ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - IUnknown_Release(unk); + check_interface(buffer, &IID_IMF2DBuffer, TRUE); + check_interface(buffer, &IID_IMF2DBuffer2, TRUE);
hr = IMFMediaBuffer_Lock(buffer, &data, NULL, NULL); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);