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
a6dbc28b
Commit
a6dbc28b
authored
May 11, 2012
by
Aric Stewart
Committed by
Alexandre Julliard
May 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Handle a crash and race condition that occurs on directsound renderer input pin disconnect.
parent
fb42513a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
dsoundrender.c
dlls/quartz/dsoundrender.c
+13
-5
No files found.
dlls/quartz/dsoundrender.c
View file @
a6dbc28b
...
...
@@ -527,7 +527,9 @@ static HRESULT WINAPI DSoundRender_BreakConnect(BaseRenderer* iface)
if
(
This
->
threadid
)
{
PostThreadMessageW
(
This
->
threadid
,
WM_APP
,
0
,
0
);
LeaveCriticalSection
(
This
->
renderer
.
pInputPin
->
pin
.
pCritSec
);
WaitForSingleObject
(
This
->
advisethread
,
INFINITE
);
EnterCriticalSection
(
This
->
renderer
.
pInputPin
->
pin
.
pCritSec
);
CloseHandle
(
This
->
advisethread
);
}
if
(
This
->
dsbuffer
)
...
...
@@ -931,10 +933,7 @@ static DWORD WINAPI DSoundAdviseThread(LPVOID lpParam) {
struct
dsoundrender_timer
*
prev
=
&
head
,
*
cur
;
hr
=
IReferenceClock_GetTime
(
&
This
->
IReferenceClock_iface
,
&
curtime
);
if
(
FAILED
(
hr
))
{
FIXME
(
"Could not get time: %08x
\n
"
,
hr
);
continue
;
}
if
(
SUCCEEDED
(
hr
))
{
TRACE
(
"Time: %s
\n
"
,
wine_dbgstr_longlong
(
curtime
));
while
(
prev
->
next
)
{
cur
=
prev
->
next
;
...
...
@@ -955,6 +954,7 @@ static DWORD WINAPI DSoundAdviseThread(LPVOID lpParam) {
prev
->
next
=
next
;
}
}
}
if
(
!
head
.
next
)
ret
=
GetMessageW
(
&
msg
,
INVALID_HANDLE_VALUE
,
WM_APP
,
WM_APP
+
4
);
else
...
...
@@ -1039,10 +1039,18 @@ static HRESULT WINAPI ReferenceClock_GetTime(IReferenceClock *iface,
DWORD
writepos1
,
writepos2
;
EnterCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
DSoundRender_UpdatePositions
(
This
,
&
writepos1
,
&
writepos2
);
if
(
This
->
renderer
.
pInputPin
&&
This
->
renderer
.
pInputPin
->
pin
.
mtCurrent
.
pbFormat
)
{
*
pTime
=
This
->
play_time
+
time_from_pos
(
This
,
This
->
last_playpos
);
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
hr
=
S_OK
;
}
else
{
ERR
(
"pInputPin Disconncted
\n
"
);
hr
=
E_FAIL
;
}
LeaveCriticalSection
(
&
This
->
renderer
.
filter
.
csFilter
);
}
if
(
FAILED
(
hr
))
WARN
(
"Could not get reference time (%x)!
\n
"
,
hr
);
...
...
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