Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
37b926b8
Commit
37b926b8
authored
Jul 13, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jul 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Return the number of media types retrieved from DMOGetTypes().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03a21914
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
15 deletions
+9
-15
dmoreg.c
dlls/msdmo/dmoreg.c
+8
-14
msdmo.c
dlls/msdmo/tests/msdmo.c
+1
-1
No files found.
dlls/msdmo/dmoreg.c
View file @
37b926b8
...
...
@@ -730,22 +730,16 @@ HRESULT WINAPI DMOGetTypes(REFCLSID clsid, ULONG input_count, ULONG *ret_input_c
}
*
ret_input_count
=
0
;
if
(
input_count
>
0
)
{
size
=
input_count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
ret
=
RegQueryValueExW
(
key
,
L"InputTypes"
,
NULL
,
NULL
,
(
BYTE
*
)
input
,
&
size
);
if
(
!
ret
||
ret
==
ERROR_MORE_DATA
)
*
ret_input_count
=
size
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
}
size
=
input_count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
ret
=
RegQueryValueExW
(
key
,
L"InputTypes"
,
NULL
,
NULL
,
(
BYTE
*
)
input
,
&
size
);
if
(
!
ret
||
ret
==
ERROR_MORE_DATA
)
*
ret_input_count
=
min
(
input_count
,
size
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
));
*
ret_output_count
=
0
;
if
(
output_count
>
0
)
{
size
=
output_count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
ret
=
RegQueryValueExW
(
key
,
L"OutputTypes"
,
NULL
,
NULL
,
(
BYTE
*
)
output
,
&
size
);
if
(
!
ret
||
ret
==
ERROR_MORE_DATA
)
*
ret_output_count
=
size
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
}
size
=
output_count
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
ret
=
RegQueryValueExW
(
key
,
L"OutputTypes"
,
NULL
,
NULL
,
(
BYTE
*
)
output
,
&
size
);
if
(
!
ret
||
ret
==
ERROR_MORE_DATA
)
*
ret_output_count
=
min
(
output_count
,
size
/
sizeof
(
DMO_PARTIAL_MEDIATYPE
));
return
S_OK
;
}
dlls/msdmo/tests/msdmo.c
View file @
37b926b8
...
...
@@ -144,7 +144,7 @@ static void test_DMOGetTypes(void)
memset
(
types
,
0
,
sizeof
(
types
));
hr
=
DMOGetTypes
(
&
GUID_unknowndmo
,
1
,
&
input_count
,
types
,
0
,
&
output_count
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
todo_wine
ok
(
input_count
==
1
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
input_count
==
1
,
"Got input count %u.
\n
"
,
input_count
);
ok
(
!
output_count
,
"Got output count %u.
\n
"
,
output_count
);
todo_wine
ok
(
!
memcmp
(
types
,
input_types
,
sizeof
(
DMO_PARTIAL_MEDIATYPE
)),
"Types didn't match.
\n
"
);
...
...
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