Commit deda3f81 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf/topoloader: Set MF_TOPONODE_MEDIASTART for all source nodes.

parent 902af3d1
...@@ -2136,6 +2136,7 @@ static void test_topology_loader_evr(void) ...@@ -2136,6 +2136,7 @@ static void test_topology_loader_evr(void)
IMFTopoLoader *loader; IMFTopoLoader *loader;
IMFMediaSink *sink; IMFMediaSink *sink;
WORD node_count; WORD node_count;
UINT64 value64;
HWND window; HWND window;
HRESULT hr; HRESULT hr;
...@@ -2232,6 +2233,13 @@ todo_wine ...@@ -2232,6 +2233,13 @@ todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
ok(!value, "Unexpected stream id %u.\n", value); 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); IMFTopology_Release(full_topology);
......
...@@ -2380,10 +2380,16 @@ static void topology_loader_resolve_complete(struct topoloader_context *context) ...@@ -2380,10 +2380,16 @@ static void topology_loader_resolve_complete(struct topoloader_context *context)
if (node_type == MF_TOPOLOGY_OUTPUT_NODE) 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))) if (FAILED(IMFTopologyNode_GetItem(node, &MF_TOPONODE_STREAMID, NULL)))
IMFTopologyNode_SetUINT32(node, &MF_TOPONODE_STREAMID, 0); 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); IMFTopologyNode_Release(node);
} }
......
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