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
8bedda7e
Commit
8bedda7e
authored
Jun 23, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jun 25, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Make the memory allocator emit more warnings and fix race condition.
parent
6aabf5d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
memallocator.c
dlls/quartz/memallocator.c
+12
-1
No files found.
dlls/quartz/memallocator.c
View file @
8bedda7e
...
...
@@ -289,7 +289,10 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
EnterCriticalSection
(
This
->
pCritSect
);
if
(
!
This
->
bCommitted
||
This
->
bDecommitQueued
)
{
WARN
(
"Not committed
\n
"
);
hr
=
VFW_E_NOT_COMMITTED
;
}
else
++
This
->
lWaiting
;
LeaveCriticalSection
(
This
->
pCritSect
);
...
...
@@ -298,7 +301,10 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
if
(
WaitForSingleObject
(
This
->
hSemWaiting
,
(
dwFlags
&
AM_GBF_NOWAIT
)
?
0
:
INFINITE
)
!=
WAIT_OBJECT_0
)
{
InterlockedDecrement
(
&
This
->
lWaiting
);
EnterCriticalSection
(
This
->
pCritSect
);
--
This
->
lWaiting
;
LeaveCriticalSection
(
This
->
pCritSect
);
WARN
(
"Timed out
\n
"
);
return
VFW_E_TIMEOUT
;
}
...
...
@@ -324,6 +330,8 @@ static HRESULT WINAPI BaseMemAllocator_GetBuffer(IMemAllocator * iface, IMediaSa
}
LeaveCriticalSection
(
This
->
pCritSect
);
if
(
hr
!=
S_OK
)
WARN
(
"%08x
\n
"
,
hr
);
return
hr
;
}
...
...
@@ -614,7 +622,10 @@ static HRESULT WINAPI StdMediaSample2_SetActualDataLength(IMediaSample2 * iface,
TRACE
(
"(%d)
\n
"
,
len
);
if
((
len
>
This
->
props
.
cbBuffer
)
||
(
len
<
0
))
{
WARN
(
"Tried to set length to %d, while max is %d
\n
"
,
len
,
This
->
props
.
cbBuffer
);
return
VFW_E_BUFFER_OVERFLOW
;
}
else
{
This
->
props
.
lActual
=
len
;
...
...
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