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
46f4c4b4
Commit
46f4c4b4
authored
Jun 26, 2008
by
Maarten Lankhorst
Committed by
Alexandre Julliard
Jun 27, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Make removing filters work slightly better.
parent
50b98a29
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
10 deletions
+25
-10
filtergraph.c
dlls/quartz/filtergraph.c
+25
-10
No files found.
dlls/quartz/filtergraph.c
View file @
46f4c4b4
...
@@ -279,22 +279,24 @@ static ULONG WINAPI FilterGraphInner_AddRef(IUnknown * iface) {
...
@@ -279,22 +279,24 @@ static ULONG WINAPI FilterGraphInner_AddRef(IUnknown * iface) {
return
ref
;
return
ref
;
}
}
static
ULONG
WINAPI
FilterGraphInner_Release
(
IUnknown
*
iface
)
{
static
ULONG
WINAPI
FilterGraphInner_Release
(
IUnknown
*
iface
)
{
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IInner_vtbl
,
iface
);
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IInner_vtbl
,
iface
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
ULONG
ref
=
InterlockedDecrement
(
&
This
->
ref
);
TRACE
(
"(%p)->(): new ref = %d
\n
"
,
This
,
ref
);
TRACE
(
"(%p)->(): new ref = %d
\n
"
,
This
,
ref
);
if
(
ref
==
0
)
{
if
(
ref
==
0
)
{
int
i
;
int
i
;
IMediaControl_Stop
((
IMediaControl
*
)
&
(
This
->
IMediaControl_vtbl
));
IMediaControl_Stop
((
IMediaControl
*
)
&
(
This
->
IMediaControl_vtbl
));
if
(
This
->
refClock
)
IReferenceClock_Release
(
This
->
refClock
);
while
(
This
->
nFilters
)
while
(
This
->
nFilters
)
IFilterGraph2_RemoveFilter
((
IFilterGraph2
*
)
This
,
This
->
ppFiltersInGraph
[
0
]);
IFilterGraph2_RemoveFilter
((
IFilterGraph2
*
)
This
,
This
->
ppFiltersInGraph
[
0
]);
if
(
This
->
refClock
)
IReferenceClock_Release
(
This
->
refClock
);
for
(
i
=
0
;
i
<
This
->
nItfCacheEntries
;
i
++
)
for
(
i
=
0
;
i
<
This
->
nItfCacheEntries
;
i
++
)
{
{
if
(
This
->
ItfCacheEntries
[
i
].
iface
)
if
(
This
->
ItfCacheEntries
[
i
].
iface
)
...
@@ -439,8 +441,8 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface,
...
@@ -439,8 +441,8 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface,
return
hr
;
return
hr
;
}
}
static
HRESULT
WINAPI
FilterGraph2_RemoveFilter
(
IFilterGraph2
*
iface
,
static
HRESULT
WINAPI
FilterGraph2_RemoveFilter
(
IFilterGraph2
*
iface
,
IBaseFilter
*
pFilter
)
IBaseFilter
*
pFilter
)
{
{
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IFilterGraph2_vtbl
,
iface
);
ICOM_THIS_MULTI
(
IFilterGraphImpl
,
IFilterGraph2_vtbl
,
iface
);
int
i
;
int
i
;
HRESULT
hr
=
E_FAIL
;
HRESULT
hr
=
E_FAIL
;
...
@@ -453,12 +455,21 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface,
...
@@ -453,12 +455,21 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface,
{
{
if
(
This
->
ppFiltersInGraph
[
i
]
==
pFilter
)
if
(
This
->
ppFiltersInGraph
[
i
]
==
pFilter
)
{
{
IEnumPins
*
penumpins
;
IEnumPins
*
penumpins
=
NULL
;
IBaseFilter_Stop
(
pFilter
);
FILTER_STATE
state
;
TRACE
(
"Removing filter %s
\n
"
,
debugstr_w
(
This
->
pFilterNames
[
i
]));
IBaseFilter_GetState
(
pFilter
,
0
,
&
state
);
if
(
state
==
State_Running
)
IBaseFilter_Pause
(
pFilter
);
if
(
state
!=
State_Stopped
)
IBaseFilter_Stop
(
pFilter
);
hr
=
IBaseFilter_EnumPins
(
pFilter
,
&
penumpins
);
hr
=
IBaseFilter_EnumPins
(
pFilter
,
&
penumpins
);
if
(
SUCCEEDED
(
hr
))
{
if
(
SUCCEEDED
(
hr
))
{
IPin
*
ppin
;
IPin
*
ppin
;
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
ppin
,
NULL
)
==
S_OK
)
{
while
(
IEnumPins_Next
(
penumpins
,
1
,
&
ppin
,
NULL
)
==
S_OK
)
{
IPin
*
victim
=
NULL
;
IPin
*
victim
=
NULL
;
HRESULT
h
;
HRESULT
h
;
IPin_ConnectedTo
(
ppin
,
&
victim
);
IPin_ConnectedTo
(
ppin
,
&
victim
);
...
@@ -470,6 +481,10 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface,
...
@@ -470,6 +481,10 @@ static HRESULT WINAPI FilterGraph2_RemoveFilter(IFilterGraph2 *iface,
{
{
PIN_INFO
pinfo
;
PIN_INFO
pinfo
;
IPin_QueryPinInfo
(
victim
,
&
pinfo
);
IPin_QueryPinInfo
(
victim
,
&
pinfo
);
IBaseFilter_GetState
(
pinfo
.
pFilter
,
0
,
&
state
);
if
(
state
==
State_Running
)
IBaseFilter_Pause
(
pinfo
.
pFilter
);
IBaseFilter_Stop
(
pinfo
.
pFilter
);
IBaseFilter_Stop
(
pinfo
.
pFilter
);
IBaseFilter_Release
(
pinfo
.
pFilter
);
IBaseFilter_Release
(
pinfo
.
pFilter
);
h
=
IPin_Disconnect
(
victim
);
h
=
IPin_Disconnect
(
victim
);
...
...
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