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
52529c92
Commit
52529c92
authored
Mar 14, 2007
by
Chris Robinson
Committed by
Alexandre Julliard
Mar 19, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Hold a reference on a filter while sending data to it.
parent
4b451853
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
4 deletions
+16
-4
pin.c
dlls/quartz/pin.c
+16
-4
No files found.
dlls/quartz/pin.c
View file @
52529c92
...
...
@@ -880,6 +880,7 @@ HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample)
{
HRESULT
hr
=
S_OK
;
IMemInputPin
*
pMemConnected
=
NULL
;
PIN_INFO
pinInfo
;
EnterCriticalSection
(
This
->
pin
.
pCritSec
);
{
...
...
@@ -889,9 +890,10 @@ HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample)
{
/* we don't have the lock held when using This->pMemInputPin,
* so we need to AddRef it to stop it being deleted while we are
* using it. */
* using it.
Same with its filter.
*/
pMemConnected
=
This
->
pMemInputPin
;
IMemInputPin_AddRef
(
pMemConnected
);
hr
=
IPin_QueryPinInfo
(
This
->
pin
.
pConnectedTo
,
&
pinInfo
);
}
}
LeaveCriticalSection
(
This
->
pin
.
pCritSec
);
...
...
@@ -902,9 +904,11 @@ HRESULT OutputPin_SendSample(OutputPin * This, IMediaSample * pSample)
* then it causes some problems (most notably with the native Video
* Renderer) if we are re-entered for whatever reason */
hr
=
IMemInputPin_Receive
(
pMemConnected
,
pSample
);
I
MemInputPin_Release
(
pMemConnected
);
I
BaseFilter_Release
(
pinInfo
.
pFilter
);
}
if
(
pMemConnected
)
IMemInputPin_Release
(
pMemConnected
);
return
hr
;
}
...
...
@@ -1155,6 +1159,7 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
REFERENCE_TIME
rtCurrent
;
ALLOCATOR_PROPERTIES
allocProps
;
PIN_INFO
pinInfo
;
CoInitializeEx
(
NULL
,
COINIT_MULTITHREADED
);
...
...
@@ -1175,6 +1180,8 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
REFERENCE_TIME
rtSampleStop
;
DWORD_PTR
dwUser
;
pinInfo
.
pFilter
=
NULL
;
TRACE
(
"Process sample
\n
"
);
hr
=
IMemAllocator_GetBuffer
(
This
->
pAlloc
,
&
pSample
,
NULL
,
NULL
,
0
);
...
...
@@ -1195,10 +1202,15 @@ static void CALLBACK PullPin_Thread_Process(ULONG_PTR iface)
hr
=
IAsyncReader_WaitForNext
(
This
->
pReader
,
10000
,
&
pSample
,
&
dwUser
);
if
(
SUCCEEDED
(
hr
))
hr
=
IPin_QueryPinInfo
((
IPin
*
)
&
This
->
pin
,
&
pinInfo
);
if
(
SUCCEEDED
(
hr
))
hr
=
This
->
fnSampleProc
(
This
->
pin
.
pUserData
,
pSample
);
else
ERR
(
"Processing error: %x
\n
"
,
hr
);
if
(
pinInfo
.
pFilter
)
IBaseFilter_Release
(
pinInfo
.
pFilter
);
if
(
pSample
)
IMediaSample_Release
(
pSample
);
}
...
...
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