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
55620f09
Commit
55620f09
authored
Apr 23, 2015
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 24, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msdmo: Added a helper to duplicate partial media type arrays.
parent
0b7b8e3d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
28 deletions
+25
-28
dmoreg.c
dlls/msdmo/dmoreg.c
+25
-28
No files found.
dlls/msdmo/dmoreg.c
View file @
55620f09
...
...
@@ -360,6 +360,21 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[])
return
S_FALSE
;
}
static
HRESULT
dup_partial_mediatype
(
const
DMO_PARTIAL_MEDIATYPE
*
types
,
DWORD
count
,
DMO_PARTIAL_MEDIATYPE
**
ret
)
{
*
ret
=
NULL
;
if
(
count
==
0
)
return
S_OK
;
*
ret
=
HeapAlloc
(
GetProcessHeap
(),
0
,
count
*
sizeof
(
*
types
));
if
(
!*
ret
)
return
E_OUTOFMEMORY
;
memcpy
(
*
ret
,
types
,
count
*
sizeof
(
*
types
));
return
S_OK
;
}
/**************************************************************************
* IEnumDMO_Constructor
*/
...
...
@@ -373,8 +388,7 @@ static HRESULT IEnumDMO_Constructor(
IEnumDMO
**
obj
)
{
IEnumDMOImpl
*
lpedmo
;
HRESULT
hr
=
S_OK
;
UINT
size
;
HRESULT
hr
;
LONG
ret
;
*
obj
=
NULL
;
...
...
@@ -388,32 +402,16 @@ static HRESULT IEnumDMO_Constructor(
lpedmo
->
index
=
-
1
;
lpedmo
->
category
=
*
guidCategory
;
lpedmo
->
dwFlags
=
dwFlags
;
lpedmo
->
cInTypes
=
cInTypes
;
lpedmo
->
cOutTypes
=
cOutTypes
;
if
(
cInTypes
>
0
)
{
size
=
cInTypes
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
lpedmo
->
pInTypes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
lpedmo
->
pInTypes
)
{
hr
=
E_OUTOFMEMORY
;
goto
lerr
;
}
memcpy
(
lpedmo
->
pInTypes
,
pInTypes
,
size
);
lpedmo
->
cInTypes
=
cInTypes
;
}
hr
=
dup_partial_mediatype
(
pInTypes
,
cInTypes
,
&
lpedmo
->
pInTypes
);
if
(
FAILED
(
hr
))
goto
lerr
;
if
(
cOutTypes
>
0
)
{
size
=
cOutTypes
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
lpedmo
->
pOutTypes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
lpedmo
->
pOutTypes
)
{
hr
=
E_OUTOFMEMORY
;
goto
lerr
;
}
memcpy
(
lpedmo
->
pOutTypes
,
pOutTypes
,
size
);
lpedmo
->
cOutTypes
=
cOutTypes
;
}
hr
=
dup_partial_mediatype
(
pOutTypes
,
cOutTypes
,
&
lpedmo
->
pOutTypes
);
if
(
FAILED
(
hr
))
goto
lerr
;
/* If not filtering by category enum from media objects root */
if
(
IsEqualGUID
(
guidCategory
,
&
GUID_NULL
))
...
...
@@ -426,8 +424,7 @@ static HRESULT IEnumDMO_Constructor(
WCHAR
szguid
[
64
];
WCHAR
szKey
[
MAX_PATH
];
wsprintfW
(
szKey
,
szCat3Fmt
,
szDMORootKey
,
szDMOCategories
,
GUIDToString
(
szguid
,
guidCategory
));
wsprintfW
(
szKey
,
szCat3Fmt
,
szDMORootKey
,
szDMOCategories
,
GUIDToString
(
szguid
,
guidCategory
));
if
((
ret
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
)))
hr
=
HRESULT_FROM_WIN32
(
ret
);
}
...
...
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