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
b3065a8b
Commit
b3065a8b
authored
May 25, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
May 27, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase/transform: Use BaseFilterImpl_Release().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
61b5f780
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
40 deletions
+31
-40
transform.c
dlls/strmbase/transform.c
+31
-40
No files found.
dlls/strmbase/transform.c
View file @
b3065a8b
...
...
@@ -139,8 +139,38 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index)
return
filter
->
ppPins
[
index
];
}
static
void
transform_destroy
(
BaseFilter
*
iface
)
{
TransformFilter
*
filter
=
impl_from_BaseFilter
(
iface
);
ULONG
i
;
for
(
i
=
0
;
i
<
2
;
++
i
)
{
IPin
*
peer
;
if
(
SUCCEEDED
(
IPin_ConnectedTo
(
filter
->
ppPins
[
i
],
&
peer
)))
{
IPin_Disconnect
(
peer
);
IPin_Release
(
peer
);
}
IPin_Disconnect
(
filter
->
ppPins
[
i
]);
IPin_Release
(
filter
->
ppPins
[
i
]);
}
CoTaskMemFree
(
filter
->
ppPins
);
filter
->
csReceive
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
filter
->
csReceive
);
FreeMediaType
(
&
filter
->
pmt
);
QualityControlImpl_Destroy
(
filter
->
qcimpl
);
IUnknown_Release
(
filter
->
seekthru_unk
);
strmbase_filter_cleanup
(
&
filter
->
filter
);
CoTaskMemFree
(
filter
);
}
static
const
BaseFilterFuncTable
tfBaseFuncTable
=
{
.
filter_get_pin
=
transform_get_pin
,
.
filter_destroy
=
transform_destroy
,
};
static
const
BaseInputPinFuncTable
tf_input_BaseInputFuncTable
=
{
...
...
@@ -161,45 +191,6 @@ static const BaseOutputPinFuncTable tf_output_BaseOutputFuncTable = {
BaseOutputPinImpl_DecideAllocator
,
};
static
ULONG
WINAPI
TransformFilterImpl_Release
(
IBaseFilter
*
iface
)
{
TransformFilter
*
This
=
impl_from_IBaseFilter
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
filter
.
refCount
);
TRACE
(
"(%p/%p)->() Release from %d
\n
"
,
This
,
iface
,
refCount
+
1
);
if
(
!
refCount
)
{
ULONG
i
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
IPin
*
pConnectedTo
;
if
(
SUCCEEDED
(
IPin_ConnectedTo
(
This
->
ppPins
[
i
],
&
pConnectedTo
)))
{
IPin_Disconnect
(
pConnectedTo
);
IPin_Release
(
pConnectedTo
);
}
IPin_Disconnect
(
This
->
ppPins
[
i
]);
IPin_Release
(
This
->
ppPins
[
i
]);
}
CoTaskMemFree
(
This
->
ppPins
);
TRACE
(
"Destroying transform filter
\n
"
);
This
->
csReceive
.
DebugInfo
->
Spare
[
0
]
=
0
;
DeleteCriticalSection
(
&
This
->
csReceive
);
FreeMediaType
(
&
This
->
pmt
);
QualityControlImpl_Destroy
(
This
->
qcimpl
);
IUnknown_Release
(
This
->
seekthru_unk
);
strmbase_filter_cleanup
(
&
This
->
filter
);
CoTaskMemFree
(
This
);
}
return
refCount
;
}
static
HRESULT
WINAPI
TransformFilterImpl_Stop
(
IBaseFilter
*
iface
)
{
TransformFilter
*
This
=
impl_from_IBaseFilter
(
iface
);
...
...
@@ -275,7 +266,7 @@ static const IBaseFilterVtbl transform_vtbl =
{
BaseFilterImpl_QueryInterface
,
BaseFilterImpl_AddRef
,
Transform
FilterImpl_Release
,
Base
FilterImpl_Release
,
BaseFilterImpl_GetClassID
,
TransformFilterImpl_Stop
,
TransformFilterImpl_Pause
,
...
...
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