From: Rémi Bernon rbernon@codeweavers.com
Signed-off-by: Rémi Bernon rbernon@codeweavers.com --- dlls/mf/tests/mf.c | 4 ---- dlls/mf/topology.c | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index 615767296b1..f6b1860e3cb 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -5991,10 +5991,8 @@ static void test_MFGetTopoNodeCurrentType(void) hr = pMFGetTopoNodeCurrentType(node, 0, TRUE, &media_type); ok(hr == MF_E_ATTRIBUTENOTFOUND, "Unexpected hr %#lx.\n", hr); hr = pMFGetTopoNodeCurrentType(node, 1, TRUE, &media_type); - todo_wine ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr); hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); - todo_wine ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetUnknown(node, &MF_TOPONODE_STREAM_DESCRIPTOR, (IUnknown *)input_descriptor); @@ -6019,10 +6017,8 @@ static void test_MFGetTopoNodeCurrentType(void) hr = pMFGetTopoNodeCurrentType(node, 0, FALSE, &media_type); ok(hr == E_FAIL, "Unexpected hr %#lx.\n", hr); hr = pMFGetTopoNodeCurrentType(node, 1, FALSE, &media_type); - todo_wine ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr); hr = pMFGetTopoNodeCurrentType(node, 0, TRUE, &media_type); - todo_wine ok(hr == MF_E_INVALIDSTREAMNUMBER, "Unexpected hr %#lx.\n", hr);
hr = IMFTopologyNode_SetObject(node, (IUnknown *)output_handler); diff --git a/dlls/mf/topology.c b/dlls/mf/topology.c index f4c28e747db..bb74307dd07 100644 --- a/dlls/mf/topology.c +++ b/dlls/mf/topology.c @@ -1840,6 +1840,9 @@ HRESULT WINAPI MFGetTopoNodeCurrentType(IMFTopologyNode *node, DWORD stream, BOO switch (node_type) { case MF_TOPOLOGY_OUTPUT_NODE: + if (output || stream) + return MF_E_INVALIDSTREAMNUMBER; + if (SUCCEEDED(hr = topology_node_get_object(node, &IID_IMFMediaTypeHandler, (void **)&type_handler))) { hr = IMFMediaTypeHandler_GetCurrentMediaType(type_handler, type); @@ -1847,6 +1850,9 @@ HRESULT WINAPI MFGetTopoNodeCurrentType(IMFTopologyNode *node, DWORD stream, BOO } break; case MF_TOPOLOGY_SOURCESTREAM_NODE: + if (!output || stream) + return MF_E_INVALIDSTREAMNUMBER; + if (FAILED(hr = IMFTopologyNode_GetUnknown(node, &MF_TOPONODE_STREAM_DESCRIPTOR, &IID_IMFStreamDescriptor, (void **)&sd))) {