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
fa262317
Commit
fa262317
authored
Mar 14, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/systemclock: Use the global HeapAlloc() wrappers.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b789c44b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
26 deletions
+22
-26
quartz_private.h
dlls/quartz/quartz_private.h
+1
-0
systemclock.c
dlls/quartz/systemclock.c
+21
-26
No files found.
dlls/quartz/quartz_private.h
View file @
fa262317
...
...
@@ -31,6 +31,7 @@
#include "winuser.h"
#include "dshow.h"
#include "wine/debug.h"
#include "wine/heap.h"
#include "wine/strmbase.h"
#include "wine/list.h"
...
...
dlls/quartz/systemclock.c
View file @
fa262317
...
...
@@ -122,7 +122,7 @@ static DWORD WINAPI SystemClockAdviseThread(LPVOID lpParam) {
SetEvent
(
it
->
hEvent
);
/** ... and Release it */
QUARTZ_RemoveAviseEntryFromQueue
(
This
,
it
);
CoTaskMemF
ree
(
it
);
heap_f
ree
(
it
);
it
=
nextit
;
}
if
(
NULL
!=
it
)
timeOut
=
(
DWORD
)
((
it
->
rtBaseTime
+
it
->
rtIntervalTime
)
-
curTime
)
/
(
REFERENCE_TIME
)
10000
;
...
...
@@ -234,7 +234,7 @@ static ULONG WINAPI SystemClockImpl_Release(IReferenceClock* iface) {
}
This
->
safe
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
safe
);
CoTaskMemF
ree
(
This
);
heap_f
ree
(
This
);
}
return
ref
;
}
...
...
@@ -279,11 +279,9 @@ static HRESULT WINAPI SystemClockImpl_AdviseTime(IReferenceClock* iface, REFEREN
if
(
NULL
==
pdwAdviseCookie
)
{
return
E_POINTER
;
}
pEntry
=
CoTaskMemAlloc
(
sizeof
(
SystemClockAdviseEntry
));
if
(
NULL
==
pEntry
)
{
if
(
!
(
pEntry
=
heap_alloc_zero
(
sizeof
(
*
pEntry
))))
return
E_OUTOFMEMORY
;
}
ZeroMemory
(
pEntry
,
sizeof
(
SystemClockAdviseEntry
));
pEntry
->
hEvent
=
(
HANDLE
)
hEvent
;
pEntry
->
rtBaseTime
=
rtBaseTime
+
rtStreamTime
;
...
...
@@ -315,11 +313,9 @@ static HRESULT WINAPI SystemClockImpl_AdvisePeriodic(IReferenceClock* iface, REF
if
(
NULL
==
pdwAdviseCookie
)
{
return
E_POINTER
;
}
pEntry
=
CoTaskMemAlloc
(
sizeof
(
SystemClockAdviseEntry
));
if
(
NULL
==
pEntry
)
{
if
(
!
(
pEntry
=
heap_alloc_zero
(
sizeof
(
*
pEntry
))))
return
E_OUTOFMEMORY
;
}
ZeroMemory
(
pEntry
,
sizeof
(
SystemClockAdviseEntry
));
pEntry
->
hEvent
=
(
HANDLE
)
hSemaphore
;
pEntry
->
rtBaseTime
=
rtStartTime
;
...
...
@@ -355,7 +351,7 @@ static HRESULT WINAPI SystemClockImpl_Unadvise(IReferenceClock* iface, DWORD_PTR
}
QUARTZ_RemoveAviseEntryFromQueue
(
This
,
pEntry
);
CoTaskMemF
ree
(
pEntry
);
heap_f
ree
(
pEntry
);
SystemClockPostMessageToAdviseThread
(
This
,
ADVISE_REMOVE
);
...
...
@@ -375,23 +371,22 @@ static const IReferenceClockVtbl SystemClock_Vtbl =
SystemClockImpl_Unadvise
};
HRESULT
QUARTZ_CreateSystemClock
(
IUnknown
*
pUnkOuter
,
LPVOID
*
ppv
)
{
SystemClockImpl
*
obj
=
NULL
;
TRACE
(
"(%p,%p)
\n
"
,
ppv
,
pUnkOuter
);
HRESULT
QUARTZ_CreateSystemClock
(
IUnknown
*
outer
,
void
**
out
)
{
SystemClockImpl
*
object
;
obj
=
CoTaskMemAlloc
(
sizeof
(
SystemClockImpl
));
if
(
NULL
==
obj
)
{
*
ppv
=
NULL
;
return
E_OUTOFMEMORY
;
}
ZeroMemory
(
obj
,
sizeof
(
SystemClockImpl
));
TRACE
(
"outer %p, out %p.
\n
"
,
outer
,
out
);
if
(
!
(
object
=
heap_alloc_zero
(
sizeof
(
*
object
))))
{
*
out
=
NULL
;
return
E_OUTOFMEMORY
;
}
obj
->
IReferenceClock_iface
.
lpVtbl
=
&
SystemClock_Vtbl
;
obj
->
ref
=
0
;
/* will be inited by QueryInterface */
object
->
IReferenceClock_iface
.
lpVtbl
=
&
SystemClock_Vtbl
;
InitializeCriticalSection
(
&
obj
->
safe
);
obj
->
safe
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": SystemClockImpl.safe"
);
InitializeCriticalSection
(
&
object
->
safe
);
object
->
safe
.
DebugInfo
->
Spare
[
0
]
=
(
DWORD_PTR
)(
__FILE__
": SystemClockImpl.safe"
);
return
SystemClockImpl_QueryInterface
(
&
obj
->
IReferenceClock_iface
,
&
IID_IReferenceClock
,
ppv
);
return
SystemClockImpl_QueryInterface
(
&
object
->
IReferenceClock_iface
,
&
IID_IReferenceClock
,
out
);
}
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