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
bf6c92aa
Commit
bf6c92aa
authored
Apr 08, 2002
by
Hidenori Takeshima
Committed by
Alexandre Julliard
Apr 08, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed crashing in stopping parser.
parent
2223450a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
4 deletions
+17
-4
parser.c
dlls/quartz/parser.c
+16
-4
parser.h
dlls/quartz/parser.h
+1
-0
No files found.
dlls/quartz/parser.c
View file @
bf6c92aa
...
...
@@ -568,9 +568,11 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
DWORD
dwRes
;
HANDLE
hEvents
[
2
];
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
&&
This
->
m_hThread
!=
(
HANDLE
)
NULL
)
if
(
This
->
m_bIsRunning
)
{
TRACE
(
"(%p) - already running
\n
"
,
This
);
return
NOERROR
;
}
This
->
m_hEventInit
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
if
(
This
->
m_hEventInit
==
(
HANDLE
)
NULL
)
...
...
@@ -601,6 +603,8 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
if
(
dwRes
!=
WAIT_OBJECT_0
)
return
E_FAIL
;
This
->
m_bIsRunning
=
TRUE
;
return
NOERROR
;
}
...
...
@@ -613,14 +617,16 @@ BOOL CParserImpl_EndThread( CParserImpl* This, BOOL bAsync )
dwThreadId
=
This
->
m_dwThreadId
;
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
)
{
if
(
dwThreadId
!=
0
)
/* FIXME? */
if
(
dwThreadId
!=
0
)
PostThreadMessageA
(
dwThreadId
,
QUARTZ_MSG_EXITTHREAD
,
0
,
0
);
if
(
bAsync
)
if
(
bAsync
&&
WaitForSingleObject
(
This
->
m_hEventInit
,
0
)
==
WAIT_TIMEOUT
)
return
FALSE
;
WaitForSingleObject
(
This
->
m_hEventInit
,
INFINITE
);
CloseHandle
(
This
->
m_hEventInit
);
This
->
m_bIsRunning
=
FALSE
;
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
}
...
...
@@ -724,9 +730,14 @@ static HRESULT CParserImpl_OnInactive( CBaseFilterImpl* pImpl )
hr
=
CParserImpl_MemCommit
(
This
);
if
(
FAILED
(
hr
)
)
return
hr
;
if
(
This
->
basefilter
.
fstate
==
State_Stopped
)
CParserImpl_EndThread
(
This
,
FALSE
);
hr
=
CParserImpl_BeginThread
(
This
);
if
(
FAILED
(
hr
)
)
{
FIXME
(
"CParserImpl_BeginThread returns %08lx
\n
"
,
hr
);
CParserImpl_EndThread
(
This
,
FALSE
);
return
hr
;
}
...
...
@@ -1100,6 +1111,7 @@ HRESULT QUARTZ_CreateParser(
This
->
m_pAllocator
=
NULL
;
ZeroMemory
(
&
This
->
m_propAlloc
,
sizeof
(
ALLOCATOR_PROPERTIES
)
);
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
This
->
m_bIsRunning
=
FALSE
;
This
->
m_hThread
=
(
HANDLE
)
NULL
;
This
->
m_dwThreadId
=
0
;
This
->
m_bSendEOS
=
FALSE
;
...
...
dlls/quartz/parser.h
View file @
bf6c92aa
...
...
@@ -48,6 +48,7 @@ struct CParserImpl
IMemAllocator
*
m_pAllocator
;
ALLOCATOR_PROPERTIES
m_propAlloc
;
HANDLE
m_hEventInit
;
BOOL
m_bIsRunning
;
DWORD
m_dwThreadId
;
HANDLE
m_hThread
;
BOOL
m_bSendEOS
;
...
...
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