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
cf1d2f5e
Commit
cf1d2f5e
authored
Jul 11, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jul 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Fix memory and sample leaks.
parent
36418d8a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
20 deletions
+11
-20
parser.c
dlls/quartz/parser.c
+0
-1
pin.c
dlls/quartz/pin.c
+11
-18
pin.h
dlls/quartz/pin.h
+0
-1
No files found.
dlls/quartz/parser.c
View file @
cf1d2f5e
...
...
@@ -246,7 +246,6 @@ HRESULT WINAPI Parser_Stop(IBaseFilter * iface)
PullPin_PauseProcessing
(
This
->
pInputPin
);
PullPin_WaitForStateChange
(
This
->
pInputPin
,
INFINITE
);
IAsyncReader_EndFlush
(
This
->
pInputPin
->
pReader
);
LeaveCriticalSection
(
&
pin
->
thread_lock
);
return
S_OK
;
...
...
dlls/quartz/pin.c
View file @
cf1d2f5e
...
...
@@ -387,6 +387,8 @@ HRESULT WINAPI IPinImpl_Disconnect(IPin * iface)
{
IPin_Release
(
This
->
pConnectedTo
);
This
->
pConnectedTo
=
NULL
;
FreeMediaType
(
&
This
->
mtCurrent
);
ZeroMemory
(
&
This
->
mtCurrent
,
sizeof
(
This
->
mtCurrent
));
hr
=
S_OK
;
}
else
...
...
@@ -944,7 +946,7 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI
(
This
->
pConnectSpecific
(
iface
,
pReceivePin
,
pmtCandidate
)
==
S_OK
))
{
hr
=
S_OK
;
CoTaskMemFre
e
(
pmtCandidate
);
DeleteMediaTyp
e
(
pmtCandidate
);
break
;
}
DeleteMediaType
(
pmtCandidate
);
...
...
@@ -967,7 +969,7 @@ HRESULT WINAPI OutputPin_Connect(IPin * iface, IPin * pReceivePin, const AM_MEDI
(
This
->
pConnectSpecific
(
iface
,
pReceivePin
,
pmtCandidate
)
==
S_OK
))
{
hr
=
S_OK
;
CoTaskMemFre
e
(
pmtCandidate
);
DeleteMediaTyp
e
(
pmtCandidate
);
break
;
}
DeleteMediaType
(
pmtCandidate
);
...
...
@@ -1008,6 +1010,8 @@ HRESULT WINAPI OutputPin_Disconnect(IPin * iface)
{
IPin_Release
(
This
->
pin
.
pConnectedTo
);
This
->
pin
.
pConnectedTo
=
NULL
;
FreeMediaType
(
&
This
->
pin
.
mtCurrent
);
ZeroMemory
(
&
This
->
pin
.
mtCurrent
,
sizeof
(
This
->
pin
.
mtCurrent
));
hr
=
S_OK
;
}
else
...
...
@@ -1559,6 +1563,8 @@ static void CALLBACK PullPin_Thread_Process(PullPin *This)
static
void
CALLBACK
PullPin_Thread_Pause
(
PullPin
*
This
)
{
PullPin_Flush
(
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
This
->
state
=
Req_Sleepy
;
SetEvent
(
This
->
hEventStateChanged
);
...
...
@@ -1583,16 +1589,6 @@ static void CALLBACK PullPin_Thread_Stop(PullPin *This)
ExitThread
(
0
);
}
static
void
CALLBACK
PullPin_Thread_Flush
(
PullPin
*
This
)
{
PullPin_Flush
(
This
);
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
This
->
state
=
Req_Sleepy
;
SetEvent
(
This
->
hEventStateChanged
);
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
}
static
DWORD
WINAPI
PullPin_Thread_Main
(
LPVOID
pv
)
{
PullPin
*
This
=
pv
;
...
...
@@ -1611,7 +1607,6 @@ static DWORD WINAPI PullPin_Thread_Main(LPVOID pv)
case
Req_Die
:
PullPin_Thread_Stop
(
This
);
break
;
case
Req_Run
:
PullPin_Thread_Process
(
This
);
break
;
case
Req_Pause
:
PullPin_Thread_Pause
(
This
);
break
;
case
Req_Flush
:
PullPin_Thread_Flush
(
This
);
break
;
case
Req_Sleepy
:
ERR
(
"Should not be signalled with SLEEPY!
\n
"
);
break
;
default:
ERR
(
"Unknown state request: %d
\n
"
,
This
->
state
);
break
;
}
...
...
@@ -1768,11 +1763,6 @@ HRESULT WINAPI PullPin_BeginFlush(IPin * iface)
PullPin_PauseProcessing
(
This
);
PullPin_WaitForStateChange
(
This
,
INFINITE
);
}
This
->
state
=
Req_Flush
;
ResetEvent
(
This
->
hEventStateChanged
);
SetEvent
(
This
->
thread_sleepy
);
PullPin_WaitForStateChange
(
This
,
INFINITE
);
}
LeaveCriticalSection
(
&
This
->
thread_lock
);
...
...
@@ -1828,6 +1818,9 @@ HRESULT WINAPI PullPin_Disconnect(IPin *iface)
IPin_Release
(
This
->
pin
.
pConnectedTo
);
This
->
pin
.
pConnectedTo
=
NULL
;
PullPin_StopProcessing
(
This
);
FreeMediaType
(
&
This
->
pin
.
mtCurrent
);
ZeroMemory
(
&
This
->
pin
.
mtCurrent
,
sizeof
(
This
->
pin
.
mtCurrent
));
hr
=
S_OK
;
}
else
...
...
dlls/quartz/pin.h
View file @
cf1d2f5e
...
...
@@ -140,7 +140,6 @@ typedef struct PullPin
#define Req_Die 1
#define Req_Run 2
#define Req_Pause 3
#define Req_Flush 4
/*** Constructors ***/
HRESULT
InputPin_Construct
(
const
IPinVtbl
*
InputPin_Vtbl
,
const
PIN_INFO
*
pPinInfo
,
SAMPLEPROC_PUSH
pSampleProc
,
LPVOID
pUserData
,
QUERYACCEPTPROC
pQueryAccept
,
CLEANUPPROC
pCleanUp
,
LPCRITICAL_SECTION
pCritSec
,
IMemAllocator
*
,
IPin
**
ppPin
);
...
...
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