mf/topology_loader: Try to connect transform nodes with their current types first.
And only if that fails try again by enumerating types.
This commit is contained in:
parent
d95d113230
commit
2d88c57716
2 changed files with 5 additions and 6 deletions
|
@ -3705,17 +3705,13 @@ todo_wine {
|
|||
hr = IMFTopology_SetUINT32(full_topology, &IID_IMFTopology, 123);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
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);
|
||||
if (hr == S_OK)
|
||||
{
|
||||
ok(full_topology != topology2, "Unexpected instance.\n");
|
||||
hr = IMFTopology_GetUINT32(topology2, &IID_IMFTopology, &value);
|
||||
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
|
||||
|
||||
ref = IMFTopology_Release(topology2);
|
||||
ok(ref == 0, "Release returned %ld\n", ref);
|
||||
}
|
||||
ref = IMFTopology_Release(full_topology);
|
||||
ok(ref == 0, "Release returned %ld\n", ref);
|
||||
}
|
||||
|
|
|
@ -525,8 +525,11 @@ static HRESULT topology_loader_resolve_branches(struct topoloader_context *conte
|
|||
else if (FAILED(hr = topology_branch_clone_nodes(context, branch)))
|
||||
WARN("Failed to clone nodes for branch %s\n", debugstr_topology_branch(branch));
|
||||
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);
|
||||
if (FAILED(hr))
|
||||
|
|
Loading…
Add table
Reference in a new issue