mf/topoloader: Set MF_TOPONODE_MEDIASTART for all source nodes.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-12-01 15:16:28 +03:00 committed by Alexandre Julliard
parent 902af3d17a
commit deda3f8172
2 changed files with 15 additions and 1 deletions

View File

@ -2136,6 +2136,7 @@ static void test_topology_loader_evr(void)
IMFTopoLoader *loader;
IMFMediaSink *sink;
WORD node_count;
UINT64 value64;
HWND window;
HRESULT hr;
@ -2232,6 +2233,13 @@ todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!value, "Unexpected stream id %u.\n", value);
}
else if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE)
{
value64 = 1;
hr = IMFTopologyNode_GetUINT64(node, &MF_TOPONODE_MEDIASTART, &value64);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!value64, "Unexpected value.\n");
}
}
IMFTopology_Release(full_topology);

View File

@ -2380,10 +2380,16 @@ static void topology_loader_resolve_complete(struct topoloader_context *context)
if (node_type == MF_TOPOLOGY_OUTPUT_NODE)
{
/* Make sure MF_TOPONODE_STREAMID is set for all outputs. */
/* Set MF_TOPONODE_STREAMID for all outputs. */
if (FAILED(IMFTopologyNode_GetItem(node, &MF_TOPONODE_STREAMID, NULL)))
IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_STREAMID, 0);
}
else if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE)
{
/* Set MF_TOPONODE_MEDIASTART for all sources. */
if (FAILED(IMFTopologyNode_GetItem(node, &MF_TOPONODE_MEDIASTART, NULL)))
IMFTopologyNode_SetUINT64(node, &MF_TOPONODE_MEDIASTART, 0);
}
IMFTopologyNode_Release(node);
}