[PATCH 02/10] mf: Do some error checkings in _Load().
Nikolay Sivov
nsivov at codeweavers.com
Mon Jun 22 06:37:36 CDT 2020
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.
More information about the wine-devel
mailing list