Module: wine Branch: master Commit: b4811dbf2654ece8b5b6e6104d5c8be0419072fd URL: https://source.winehq.org/git/wine.git/?a=commit;h=b4811dbf2654ece8b5b6e6104...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Mon Apr 15 10:32:03 2019 +0300
mf/tests: Fix test crash on Vista.
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/mf/tests/mf.c | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 4dfefdd..80dc990 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -298,6 +298,12 @@ static void test_topology(void) ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection);
+ hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node); + ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); + hr = IMFTopology_AddNode(topology, node); + ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); + IMFTopologyNode_Release(node); + hr = IMFTopology_GetOutputNodeCollection(topology, &collection); ok(hr == S_OK || broken(hr == E_FAIL) /* before Win8 */, "Failed to get output node collection, hr %#x.\n", hr); if (SUCCEEDED(hr)) @@ -305,20 +311,6 @@ static void test_topology(void) ok(!!collection, "Unexpected object pointer.\n"); hr = IMFCollection_GetElementCount(collection, &size); ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); - ok(!size, "Unexpected item count.\n"); - IMFCollection_Release(collection); - - hr = MFCreateTopologyNode(MF_TOPOLOGY_OUTPUT_NODE, &node); - ok(hr == S_OK, "Failed to create a node, hr %#x.\n", hr); - hr = IMFTopology_AddNode(topology, node); - ok(hr == S_OK, "Failed to add a node, hr %#x.\n", hr); - IMFTopologyNode_Release(node); - - hr = IMFTopology_GetOutputNodeCollection(topology, &collection); - ok(hr == S_OK, "Failed to get output node collection, hr %#x.\n", hr); - ok(!!collection, "Unexpected object pointer.\n"); - hr = IMFCollection_GetElementCount(collection, &size); - ok(hr == S_OK, "Failed to get item count, hr %#x.\n", hr); ok(size == 1, "Unexpected item count.\n"); IMFCollection_Release(collection); }