mf/topology: Copy input topology attributes on Load().

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2021-04-12 12:19:51 +03:00 committed by Alexandre Julliard
parent b6b98933ec
commit b75301b471
2 changed files with 6 additions and 0 deletions

View file

@ -2109,9 +2109,13 @@ todo_wine {
IMFTopologyNode_Release(sink_node2);
hr = IMFTopology_SetUINT32(full_topology, &IID_IMFTopology, 123);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFTopoLoader_Load(loader, full_topology, &topology2, NULL);
ok(hr == S_OK, "Failed to resolve topology, hr %#x.\n", hr);
ok(full_topology != topology2, "Unexpected instance.\n");
hr = IMFTopology_GetUINT32(topology2, &IID_IMFTopology, &value);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
IMFTopology_Release(topology2);
IMFTopology_Release(full_topology);

View file

@ -2567,6 +2567,8 @@ static HRESULT WINAPI topology_loader_Load(IMFTopoLoader *iface, IMFTopology *in
if (FAILED(hr = MFCreateTopology(&output_topology)))
return hr;
IMFTopology_CopyAllItems(input_topology, (IMFAttributes *)output_topology);
context.input_topology = input_topology;
context.output_topology = output_topology;
memset(&context.key, 0xff, sizeof(context.key));