Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
7056f421
Commit
7056f421
authored
May 17, 2023
by
Bernhard Kölbl
Committed by
Alexandre Julliard
May 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Don't try to clone non existent topo connections.
Signed-off-by:
Bernhard Kölbl
<
besentv@gmail.com
>
parent
79ce998e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
56 additions
and
1 deletion
+56
-1
mf.c
dlls/mf/tests/mf.c
+50
-0
topology.c
dlls/mf/topology.c
+6
-1
No files found.
dlls/mf/tests/mf.c
View file @
7056f421
...
...
@@ -1194,6 +1194,56 @@ static void test_topology(void)
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ref
=
IMFTopologyNode_Release
(
node2
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
/* Try cloning a topology without all outputs connected */
hr
=
MFCreateTopology
(
&
topology
);
ok
(
hr
==
S_OK
,
"Failed to create topology, hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateTopology
(
&
topology2
);
ok
(
hr
==
S_OK
,
"Failed to create topology, hr %#lx.
\n
"
,
hr
);
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_TRANSFORM_NODE
,
&
node
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopology_AddNode
(
topology
,
node
);
ok
(
hr
==
S_OK
,
"Failed to add a node, hr %#lx.
\n
"
,
hr
);
EXPECT_REF
(
node
,
2
);
hr
=
MFCreateTopologyNode
(
MF_TOPOLOGY_OUTPUT_NODE
,
&
node2
);
ok
(
hr
==
S_OK
,
"Failed to create topology node, hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopology_AddNode
(
topology
,
node2
);
ok
(
hr
==
S_OK
,
"Failed to add a node, hr %#lx.
\n
"
,
hr
);
EXPECT_REF
(
node
,
2
);
hr
=
IMFTopologyNode_ConnectOutput
(
node
,
1
,
node2
,
0
);
ok
(
hr
==
S_OK
,
"Failed to connect output, hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopology_CloneFrom
(
topology2
,
topology
);
ok
(
hr
==
S_OK
,
"Failed to clone from topology, hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopology_GetNodeCount
(
topology2
,
&
node_count
);
ok
(
hr
==
S_OK
,
"Failed to get node count, hr %#lx.
\n
"
,
hr
);
ok
(
node_count
==
2
,
"Unexpected node count %u.
\n
"
,
node_count
);
hr
=
IMFTopology_GetNode
(
topology2
,
0
,
&
node3
);
ok
(
hr
==
S_OK
,
"Failed to get node, hr %#lx.
\n
"
,
hr
);
hr
=
IMFTopologyNode_GetOutputCount
(
node3
,
&
size
);
ok
(
hr
==
S_OK
,
"Failed to get output count, hr %#lx.
\n
"
,
hr
);
ok
(
size
==
2
,
"Unexpected output count %lu.
\n
"
,
size
);
IMFTopologyNode_Release
(
node3
);
ref
=
IMFTopology_Release
(
topology2
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ref
=
IMFTopology_Release
(
topology
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ref
=
IMFTopologyNode_Release
(
node2
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
ref
=
IMFTopologyNode_Release
(
node
);
ok
(
ref
==
0
,
"Release returned %ld
\n
"
,
ref
);
}
static
void
test_topology_tee_node
(
void
)
...
...
dlls/mf/topology.c
View file @
7056f421
...
...
@@ -712,7 +712,12 @@ static HRESULT WINAPI topology_CloneFrom(IMFTopology *iface, IMFTopology *src)
for
(
j
=
0
;
j
<
outputs
->
count
;
++
j
)
{
DWORD
input_index
=
outputs
->
streams
[
j
].
connection_stream
;
TOPOID
id
=
outputs
->
streams
[
j
].
connection
->
id
;
TOPOID
id
;
if
(
!
outputs
->
streams
[
j
].
connection
)
continue
;
id
=
outputs
->
streams
[
j
].
connection
->
id
;
/* Skip node lookup in destination topology, assuming same node order. */
if
(
SUCCEEDED
(
hr
=
topology_get_node_by_id
(
topology
,
id
,
&
node
)))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment