Rémi Bernon (@rbernon) commented about dlls/mf/topology_loader.c:
for (i = 0; SUCCEEDED(IMFTopology_GetNode(input_topology, i, &node)); i++) { - hr = topology_node_list_branches(node, &branches); + if (topology_node_get_type(node) == MF_TOPOLOGY_SOURCESTREAM_NODE) + { + source_count++; + + if (topology_node_get_connect_method_semantics(node) & MF_CONNECT_AS_OPTIONAL_BRANCH) + FIXME("Optional branches are not supported.\n"); + hr = topology_loader_resolve_source_branch(&context, node); + } IMFTopologyNode_Release(node); if (FAILED(hr)) break; }
I think we could use the IMFTopology_GetSourceNodeCollection if we want to iterate over source nodes only. It would make counting the node trivial as well. It would also allow us to return early with MF_E_TOPO_UNSUPPORTED when there's no source nodes. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10645#note_137734