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
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
7 deletions
+22
-7
filtergraph.c
dlls/quartz/filtergraph.c
+22
-7
No files found.
dlls/quartz/filtergraph.c
View file @
46f4c4b4
...
@@ -279,7 +279,8 @@ static ULONG WINAPI FilterGraphInner_AddRef(IUnknown * iface) {
...
@@ -279,7 +279,8 @@ 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
);
...
@@ -289,12 +290,13 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown * iface) {
...
@@ -289,12 +290,13 @@ static ULONG WINAPI FilterGraphInner_Release(IUnknown * iface) {
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
;
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
);
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