Skip to content

Commit

Permalink
mf/topology_loader: Use a local variable for the indirect connection …
Browse files Browse the repository at this point in the history
…method.

Instead of modifying the method_mask parameter, in case we need to retry
with another transform.
  • Loading branch information
rbernon authored and julliard committed Jan 30, 2024
1 parent 56b1f80 commit 0dab1ff
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dlls/mf/topology_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,7 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC
{
struct topology_branch down_branch = {.up.node = node, .down = branch->down};
struct topology_branch up_branch = {.up = branch->up, .down.node = node};
MF_CONNECT_METHOD method = method_mask;

if (FAILED(IMFActivate_ActivateObject(activates[i], &IID_IMFTransform, (void **)&transform)))
continue;
Expand All @@ -313,12 +314,12 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC
if (SUCCEEDED(hr))
hr = IMFTransform_SetOutputType(transform, 0, down_type, 0);
if (SUCCEEDED(hr))
method_mask = MF_CONNECT_DIRECT;
method = MF_CONNECT_DIRECT;
}
IMFTransform_Release(transform);

if (SUCCEEDED(hr))
hr = topology_branch_connect(topology, method_mask, &down_branch, !down_type);
hr = topology_branch_connect(topology, method, &down_branch, !down_type);
if (SUCCEEDED(hr))
hr = IMFTopology_AddNode(topology, node);
if (SUCCEEDED(hr))
Expand Down

0 comments on commit 0dab1ff

Please sign in to comment.