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
2be95875
Commit
2be95875
authored
Aug 17, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 23, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf: Support uninitialized downstream media types in topology loader.
parent
e1768353
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
mf.c
dlls/mf/tests/mf.c
+0
-2
topology_loader.c
dlls/mf/topology_loader.c
+25
-1
No files found.
dlls/mf/tests/mf.c
View file @
2be95875
...
...
@@ -2746,7 +2746,6 @@ todo_wine {
hr
=
IMFMediaType_Compare
(
output_type
,
(
IMFAttributes
*
)
media_type
,
MF_ATTRIBUTES_MATCH_OUR_ITEMS
,
&
ret
);
ok
(
hr
==
S_OK
,
"Failed to compare media types, hr %#lx.
\n
"
,
hr
);
todo_wine_if
(
test
->
flags
&
LOADER_SET_MEDIA_TYPES
)
ok
(
ret
,
"Output type of last transform doesn't match sink node type.
\n
"
);
IMFTopologyNode_Release
(
mft_node
);
...
...
@@ -2776,7 +2775,6 @@ todo_wine {
ok
(
!
count
,
"Unexpected count %u.
\n
"
,
count
);
if
(
test
->
flags
&
LOADER_SET_MEDIA_TYPES
)
todo_wine
ok
(
handler
.
enum_count
,
"got %lu GetMediaTypeByIndex
\n
"
,
handler
.
enum_count
);
else
ok
(
!
handler
.
enum_count
,
"got %lu GetMediaTypeByIndex
\n
"
,
handler
.
enum_count
);
...
...
dlls/mf/topology_loader.c
View file @
2be95875
...
...
@@ -335,6 +335,30 @@ static HRESULT topology_branch_connect_indirect(IMFTopology *topology, MF_CONNEC
return
hr
;
}
static
HRESULT
topology_branch_get_current_type
(
IMFMediaTypeHandler
*
handler
,
IMFMediaType
**
type
)
{
IMFMediaType
*
media_type
;
HRESULT
hr
;
DWORD
i
;
hr
=
IMFMediaTypeHandler_GetCurrentMediaType
(
handler
,
type
);
if
(
hr
!=
MF_E_NOT_INITIALIZED
)
return
hr
;
for
(
i
=
0
;
SUCCEEDED
(
hr
=
IMFMediaTypeHandler_GetMediaTypeByIndex
(
handler
,
i
,
&
media_type
));
i
++
)
{
if
(
SUCCEEDED
(
hr
=
IMFMediaTypeHandler_IsMediaTypeSupported
(
handler
,
media_type
,
NULL
)))
{
*
type
=
media_type
;
return
hr
;
}
IMFMediaType_Release
(
media_type
);
}
return
hr
;
}
static
HRESULT
topology_branch_connect_down
(
IMFTopology
*
topology
,
MF_CONNECT_METHOD
method_mask
,
struct
topology_branch
*
branch
,
IMFMediaType
*
up_type
)
{
...
...
@@ -353,7 +377,7 @@ static HRESULT topology_branch_connect_down(IMFTopology *topology, MF_CONNECT_ME
if
(
FAILED
(
hr
=
topology_node_get_type_handler
(
branch
->
down
.
node
,
branch
->
down
.
stream
,
FALSE
,
&
down_handler
)))
return
hr
;
if
(
SUCCEEDED
(
hr
=
IMFMediaTypeHandler_GetCurrentMediaT
ype
(
down_handler
,
&
down_type
))
if
(
SUCCEEDED
(
hr
=
topology_branch_get_current_t
ype
(
down_handler
,
&
down_type
))
&&
IMFMediaType_IsEqual
(
up_type
,
down_type
,
&
flags
)
==
S_OK
)
{
TRACE
(
"Connecting branch %s with current type %p.
\n
"
,
debugstr_topology_branch
(
branch
),
up_type
);
...
...
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