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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
26 deletions
+23
-26
dmoreg.c
dlls/msdmo/dmoreg.c
+23
-26
No files found.
dlls/msdmo/dmoreg.c
View file @
55620f09
...
@@ -360,6 +360,21 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[])
...
@@ -360,6 +360,21 @@ HRESULT WINAPI DMOGetName(REFCLSID clsidDMO, WCHAR name[])
return
S_FALSE
;
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
* IEnumDMO_Constructor
*/
*/
...
@@ -373,8 +388,7 @@ static HRESULT IEnumDMO_Constructor(
...
@@ -373,8 +388,7 @@ static HRESULT IEnumDMO_Constructor(
IEnumDMO
**
obj
)
IEnumDMO
**
obj
)
{
{
IEnumDMOImpl
*
lpedmo
;
IEnumDMOImpl
*
lpedmo
;
HRESULT
hr
=
S_OK
;
HRESULT
hr
;
UINT
size
;
LONG
ret
;
LONG
ret
;
*
obj
=
NULL
;
*
obj
=
NULL
;
...
@@ -388,32 +402,16 @@ static HRESULT IEnumDMO_Constructor(
...
@@ -388,32 +402,16 @@ static HRESULT IEnumDMO_Constructor(
lpedmo
->
index
=
-
1
;
lpedmo
->
index
=
-
1
;
lpedmo
->
category
=
*
guidCategory
;
lpedmo
->
category
=
*
guidCategory
;
lpedmo
->
dwFlags
=
dwFlags
;
lpedmo
->
dwFlags
=
dwFlags
;
lpedmo
->
cInTypes
=
cInTypes
;
lpedmo
->
cOutTypes
=
cOutTypes
;
if
(
cInTypes
>
0
)
hr
=
dup_partial_mediatype
(
pInTypes
,
cInTypes
,
&
lpedmo
->
pInTypes
);
{
if
(
FAILED
(
hr
))
size
=
cInTypes
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
lpedmo
->
pInTypes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
lpedmo
->
pInTypes
)
{
hr
=
E_OUTOFMEMORY
;
goto
lerr
;
goto
lerr
;
}
memcpy
(
lpedmo
->
pInTypes
,
pInTypes
,
size
);
lpedmo
->
cInTypes
=
cInTypes
;
}
if
(
cOutTypes
>
0
)
hr
=
dup_partial_mediatype
(
pOutTypes
,
cOutTypes
,
&
lpedmo
->
pOutTypes
);
{
if
(
FAILED
(
hr
))
size
=
cOutTypes
*
sizeof
(
DMO_PARTIAL_MEDIATYPE
);
lpedmo
->
pOutTypes
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
);
if
(
!
lpedmo
->
pOutTypes
)
{
hr
=
E_OUTOFMEMORY
;
goto
lerr
;
goto
lerr
;
}
memcpy
(
lpedmo
->
pOutTypes
,
pOutTypes
,
size
);
lpedmo
->
cOutTypes
=
cOutTypes
;
}
/* If not filtering by category enum from media objects root */
/* If not filtering by category enum from media objects root */
if
(
IsEqualGUID
(
guidCategory
,
&
GUID_NULL
))
if
(
IsEqualGUID
(
guidCategory
,
&
GUID_NULL
))
...
@@ -426,8 +424,7 @@ static HRESULT IEnumDMO_Constructor(
...
@@ -426,8 +424,7 @@ static HRESULT IEnumDMO_Constructor(
WCHAR
szguid
[
64
];
WCHAR
szguid
[
64
];
WCHAR
szKey
[
MAX_PATH
];
WCHAR
szKey
[
MAX_PATH
];
wsprintfW
(
szKey
,
szCat3Fmt
,
szDMORootKey
,
szDMOCategories
,
wsprintfW
(
szKey
,
szCat3Fmt
,
szDMORootKey
,
szDMOCategories
,
GUIDToString
(
szguid
,
guidCategory
));
GUIDToString
(
szguid
,
guidCategory
));
if
((
ret
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
)))
if
((
ret
=
RegOpenKeyExW
(
HKEY_CLASSES_ROOT
,
szKey
,
0
,
KEY_READ
,
&
lpedmo
->
hkey
)))
hr
=
HRESULT_FROM_WIN32
(
ret
);
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