22 Jun
2020
22 Jun
'20
11:37 a.m.
On 6/15/20 4:41 AM, Sergio Gómez Del Real wrote:
+ if (FAILED(IMFTopology_GetNodeCount(input_topology, &count)) + || count < 2) + { + hr = MF_E_TOPO_UNSUPPORTED; + return hr; + } This should come up later as more generic case of zero branches, or badly incomplete output topology.
+ + if (FAILED(hr = MFCreateTopology(output_topology))) + return hr; + + i = 0; + while (SUCCEEDED(IMFTopology_GetNode(input_topology, i++, &node))) { Won't moving creation call before the loop leak output topology on error case? I seems unlikely that on error condition it still returns empty output topology.