[PATCH 05/10] mf: Get max depth of branches in input topology in _Load().
Nikolay Sivov
nsivov at codeweavers.com
Mon Jun 22 06:44:20 CDT 2020
On 6/15/20 4:41 AM, Sergio Gómez Del Real wrote:
> +static int topology_loader_get_branch_depth(IMFTopologyNode *node, int level)
> +{
> + IMFTopologyNode *current_node;
> + MF_TOPOLOGY_TYPE node_type;
> + static int max_level = 0;
> +
> + if (level > max_level)
> + max_level = level;
> +
> + IMFTopologyNode_GetNodeType(node, &node_type);
> + if (node_type == MF_TOPOLOGY_SOURCESTREAM_NODE || node_type == MF_TOPOLOGY_TRANSFORM_NODE)
> + {
> + int stream = 0;
> + DWORD input_stream;
> +
> + while (SUCCEEDED(IMFTopologyNode_GetOutput(node, stream++, ¤t_node, &input_stream)))
> + topology_loader_get_branch_depth(current_node, level + 1);
> + }
> +
> + return max_level;
> +}
I don't understand the purpose of this. Could you elaborate? I see it's
used in 6/10, but why can't we
iterate until output node is reached?
P.S. regardless of the above, static variable should not be used for this.
More information about the wine-devel
mailing list