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
3d463b8f
Commit
3d463b8f
authored
Feb 19, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Hold platform lock for async results lifetime.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e87faa1a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
2 deletions
+29
-2
main.c
dlls/mfplat/main.c
+23
-0
mfplat.spec
dlls/mfplat/mfplat.spec
+2
-2
queue.c
dlls/mfplat/queue.c
+4
-0
No files found.
dlls/mfplat/main.c
View file @
3d463b8f
...
...
@@ -38,6 +38,8 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
mfplat
);
static
LONG
platform_lock
;
static
const
WCHAR
transform_keyW
[]
=
{
'M'
,
'e'
,
'd'
,
'i'
,
'a'
,
'F'
,
'o'
,
'u'
,
'n'
,
'd'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'\\'
,
'T'
,
'r'
,
'a'
,
'n'
,
's'
,
'f'
,
'o'
,
'r'
,
'm'
,
's'
,
0
};
static
const
WCHAR
categories_keyW
[]
=
{
'M'
,
'e'
,
'd'
,
'i'
,
'a'
,
'F'
,
'o'
,
'u'
,
'n'
,
'd'
,
'a'
,
't'
,
'i'
,
'o'
,
'n'
,
'\\'
,
...
...
@@ -450,6 +452,27 @@ HRESULT WINAPI MFStartup(ULONG version, DWORD flags)
HRESULT
WINAPI
MFShutdown
(
void
)
{
FIXME
(
"(): stub
\n
"
);
return
S_OK
;
}
/***********************************************************************
* MFLockPlatform (mfplat.@)
*/
HRESULT
WINAPI
MFLockPlatform
(
void
)
{
InterlockedIncrement
(
&
platform_lock
);
return
S_OK
;
}
/***********************************************************************
* MFUnlockPlatform (mfplat.@)
*/
HRESULT
WINAPI
MFUnlockPlatform
(
void
)
{
InterlockedDecrement
(
&
platform_lock
);
return
S_OK
;
}
...
...
dlls/mfplat/mfplat.spec
View file @
3d463b8f
...
...
@@ -118,7 +118,7 @@
@ stub MFInitVideoFormat_RGB
@ stub MFInvokeCallback
@ stub MFJoinIoPort
@ st
ub MFLockPlatform
@ st
dcall MFLockPlatform()
@ stub MFLockWorkQueue
@ stub MFPutWorkItem
@ stub MFPutWorkItemEx
...
...
@@ -146,7 +146,7 @@
@ stub MFTraceError
@ stub MFTraceFuncEnter
@ stub MFUnblockThread
@ st
ub MFUnlockPlatform
@ st
dcall MFUnlockPlatform()
@ stub MFUnlockWorkQueue
@ stub MFUnwrapMediaType
@ stub MFValidateMediaTypeSize
...
...
dlls/mfplat/queue.c
View file @
3d463b8f
...
...
@@ -83,6 +83,8 @@ static ULONG WINAPI async_result_Release(IMFAsyncResult *iface)
if
(
result
->
state
)
IUnknown_Release
(
result
->
state
);
heap_free
(
result
);
MFUnlockPlatform
();
}
return
refcount
;
...
...
@@ -172,6 +174,8 @@ HRESULT WINAPI MFCreateAsyncResult(IUnknown *object, IMFAsyncCallback *callback,
if
(
!
result
)
return
E_OUTOFMEMORY
;
MFLockPlatform
();
result
->
result
.
AsyncResult
.
lpVtbl
=
&
async_result_vtbl
;
result
->
refcount
=
1
;
result
->
object
=
object
;
...
...
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