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
b8a7ead3
Commit
b8a7ead3
authored
Nov 21, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Nov 22, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Don't forget to add ref pUnk in CopyMediaType when pbFormat is null.
parent
44c6ca99
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
8 deletions
+11
-8
mediatype.c
dlls/strmbase/mediatype.c
+11
-8
No files found.
dlls/strmbase/mediatype.c
View file @
b8a7ead3
...
...
@@ -28,15 +28,18 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
strmbase
);
HRESULT
WINAPI
CopyMediaType
(
AM_MEDIA_TYPE
*
pDest
,
const
AM_MEDIA_TYPE
*
pS
rc
)
HRESULT
WINAPI
CopyMediaType
(
AM_MEDIA_TYPE
*
dest
,
const
AM_MEDIA_TYPE
*
s
rc
)
{
*
pDest
=
*
pSrc
;
if
(
!
pSrc
->
pbFormat
)
return
S_OK
;
if
(
!
(
pDest
->
pbFormat
=
CoTaskMemAlloc
(
pSrc
->
cbFormat
)))
return
E_OUTOFMEMORY
;
memcpy
(
pDest
->
pbFormat
,
pSrc
->
pbFormat
,
pSrc
->
cbFormat
);
if
(
pDest
->
pUnk
)
IUnknown_AddRef
(
pDest
->
pUnk
);
*
dest
=
*
src
;
if
(
src
->
pbFormat
)
{
dest
->
pbFormat
=
CoTaskMemAlloc
(
src
->
cbFormat
);
if
(
!
dest
->
pbFormat
)
return
E_OUTOFMEMORY
;
memcpy
(
dest
->
pbFormat
,
src
->
pbFormat
,
src
->
cbFormat
);
}
if
(
dest
->
pUnk
)
IUnknown_AddRef
(
dest
->
pUnk
);
return
S_OK
;
}
...
...
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