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
Show 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 )
...
@@ -568,9 +568,11 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
DWORD
dwRes
;
DWORD
dwRes
;
HANDLE
hEvents
[
2
];
HANDLE
hEvents
[
2
];
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
&&
if
(
This
->
m_bIsRunning
)
This
->
m_hThread
!=
(
HANDLE
)
NULL
)
{
TRACE
(
"(%p) - already running
\n
"
,
This
);
return
NOERROR
;
return
NOERROR
;
}
This
->
m_hEventInit
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
This
->
m_hEventInit
=
CreateEventA
(
NULL
,
TRUE
,
FALSE
,
NULL
);
if
(
This
->
m_hEventInit
==
(
HANDLE
)
NULL
)
if
(
This
->
m_hEventInit
==
(
HANDLE
)
NULL
)
...
@@ -601,6 +603,8 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
...
@@ -601,6 +603,8 @@ HRESULT CParserImpl_BeginThread( CParserImpl* This )
if
(
dwRes
!=
WAIT_OBJECT_0
)
if
(
dwRes
!=
WAIT_OBJECT_0
)
return
E_FAIL
;
return
E_FAIL
;
This
->
m_bIsRunning
=
TRUE
;
return
NOERROR
;
return
NOERROR
;
}
}
...
@@ -613,14 +617,16 @@ BOOL CParserImpl_EndThread( CParserImpl* This, BOOL bAsync )
...
@@ -613,14 +617,16 @@ BOOL CParserImpl_EndThread( CParserImpl* This, BOOL bAsync )
dwThreadId
=
This
->
m_dwThreadId
;
dwThreadId
=
This
->
m_dwThreadId
;
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
)
if
(
This
->
m_hEventInit
!=
(
HANDLE
)
NULL
)
{
{
if
(
dwThreadId
!=
0
)
/* FIXME? */
if
(
dwThreadId
!=
0
)
PostThreadMessageA
(
PostThreadMessageA
(
dwThreadId
,
QUARTZ_MSG_EXITTHREAD
,
0
,
0
);
dwThreadId
,
QUARTZ_MSG_EXITTHREAD
,
0
,
0
);
if
(
bAsync
)
if
(
bAsync
&&
WaitForSingleObject
(
This
->
m_hEventInit
,
0
)
==
WAIT_TIMEOUT
)
return
FALSE
;
return
FALSE
;
WaitForSingleObject
(
This
->
m_hEventInit
,
INFINITE
);
WaitForSingleObject
(
This
->
m_hEventInit
,
INFINITE
);
CloseHandle
(
This
->
m_hEventInit
);
CloseHandle
(
This
->
m_hEventInit
);
This
->
m_bIsRunning
=
FALSE
;
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
}
}
...
@@ -724,9 +730,14 @@ static HRESULT CParserImpl_OnInactive( CBaseFilterImpl* pImpl )
...
@@ -724,9 +730,14 @@ static HRESULT CParserImpl_OnInactive( CBaseFilterImpl* pImpl )
hr
=
CParserImpl_MemCommit
(
This
);
hr
=
CParserImpl_MemCommit
(
This
);
if
(
FAILED
(
hr
)
)
if
(
FAILED
(
hr
)
)
return
hr
;
return
hr
;
if
(
This
->
basefilter
.
fstate
==
State_Stopped
)
CParserImpl_EndThread
(
This
,
FALSE
);
hr
=
CParserImpl_BeginThread
(
This
);
hr
=
CParserImpl_BeginThread
(
This
);
if
(
FAILED
(
hr
)
)
if
(
FAILED
(
hr
)
)
{
{
FIXME
(
"CParserImpl_BeginThread returns %08lx
\n
"
,
hr
);
CParserImpl_EndThread
(
This
,
FALSE
);
CParserImpl_EndThread
(
This
,
FALSE
);
return
hr
;
return
hr
;
}
}
...
@@ -1100,6 +1111,7 @@ HRESULT QUARTZ_CreateParser(
...
@@ -1100,6 +1111,7 @@ HRESULT QUARTZ_CreateParser(
This
->
m_pAllocator
=
NULL
;
This
->
m_pAllocator
=
NULL
;
ZeroMemory
(
&
This
->
m_propAlloc
,
sizeof
(
ALLOCATOR_PROPERTIES
)
);
ZeroMemory
(
&
This
->
m_propAlloc
,
sizeof
(
ALLOCATOR_PROPERTIES
)
);
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
This
->
m_hEventInit
=
(
HANDLE
)
NULL
;
This
->
m_bIsRunning
=
FALSE
;
This
->
m_hThread
=
(
HANDLE
)
NULL
;
This
->
m_hThread
=
(
HANDLE
)
NULL
;
This
->
m_dwThreadId
=
0
;
This
->
m_dwThreadId
=
0
;
This
->
m_bSendEOS
=
FALSE
;
This
->
m_bSendEOS
=
FALSE
;
...
...
dlls/quartz/parser.h
View file @
bf6c92aa
...
@@ -48,6 +48,7 @@ struct CParserImpl
...
@@ -48,6 +48,7 @@ struct CParserImpl
IMemAllocator
*
m_pAllocator
;
IMemAllocator
*
m_pAllocator
;
ALLOCATOR_PROPERTIES
m_propAlloc
;
ALLOCATOR_PROPERTIES
m_propAlloc
;
HANDLE
m_hEventInit
;
HANDLE
m_hEventInit
;
BOOL
m_bIsRunning
;
DWORD
m_dwThreadId
;
DWORD
m_dwThreadId
;
HANDLE
m_hThread
;
HANDLE
m_hThread
;
BOOL
m_bSendEOS
;
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