Commit 2d88c577 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

mf/topology_loader: Try to connect transform nodes with their current types first.

And only if that fails try again by enumerating types.
parent d95d1132
...@@ -3705,17 +3705,13 @@ todo_wine { ...@@ -3705,17 +3705,13 @@ todo_wine {
hr = IMFTopology_SetUINT32(full_topology, &IID_IMFTopology, 123); hr = IMFTopology_SetUINT32(full_topology, &IID_IMFTopology, 123);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL); hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL);
todo_wine_if(IsEqualGUID(&test->decoder_class, &CLSID_MSH264DecoderMFT))
ok(hr == S_OK, "Failed to resolve topology, hr %#lx.\n", hr); ok(hr == S_OK, "Failed to resolve topology, hr %#lx.\n", hr);
if (hr == S_OK)
{
ok(full_topology != topology2, "Unexpected instance.\n"); ok(full_topology != topology2, "Unexpected instance.\n");
hr = IMFTopology_GetUINT32(topology2, &IID_IMFTopology, &value); hr = IMFTopology_GetUINT32(topology2, &IID_IMFTopology, &value);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr); ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ref = IMFTopology_Release(topology2); ref = IMFTopology_Release(topology2);
ok(ref == 0, "Release returned %ld\n", ref); ok(ref == 0, "Release returned %ld\n", ref);
}
ref = IMFTopology_Release(full_topology); ref = IMFTopology_Release(full_topology);
ok(ref == 0, "Release returned %ld\n", ref); ok(ref == 0, "Release returned %ld\n", ref);
} }
......
...@@ -525,8 +525,11 @@ static HRESULT topology_loader_resolve_branches(struct topoloader_context *conte ...@@ -525,8 +525,11 @@ static HRESULT topology_loader_resolve_branches(struct topoloader_context *conte
else if (FAILED(hr = topology_branch_clone_nodes(context, branch))) else if (FAILED(hr = topology_branch_clone_nodes(context, branch)))
WARN("Failed to clone nodes for branch %s\n", debugstr_topology_branch(branch)); WARN("Failed to clone nodes for branch %s\n", debugstr_topology_branch(branch));
else else
hr = topology_branch_connect(context->output_topology, MF_CONNECT_ALLOW_DECODER, {
branch, enumerate_source_types || node_type == MF_TOPOLOGY_TRANSFORM_NODE); hr = topology_branch_connect(context->output_topology, MF_CONNECT_ALLOW_DECODER, branch, enumerate_source_types);
if (hr == MF_E_INVALIDMEDIATYPE && !enumerate_source_types && node_type == MF_TOPOLOGY_TRANSFORM_NODE)
hr = topology_branch_connect(context->output_topology, MF_CONNECT_ALLOW_DECODER, branch, TRUE);
}
topology_branch_destroy(branch); topology_branch_destroy(branch);
if (FAILED(hr)) if (FAILED(hr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment