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
8d249e18
Commit
8d249e18
authored
Jun 17, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Share sink pin and filter reference counts.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dae86f1e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
27 deletions
+18
-27
gstdemux.c
dlls/winegstreamer/gstdemux.c
+18
-27
No files found.
dlls/winegstreamer/gstdemux.c
View file @
8d249e18
...
...
@@ -1211,7 +1211,6 @@ static void gstdemux_destroy(BaseFilter *iface)
{
GSTImpl
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
IBaseFilter_iface
);
IPin
*
connected
=
NULL
;
ULONG
pinref
;
HRESULT
hr
;
CloseHandle
(
filter
->
no_more_pads_event
);
...
...
@@ -1227,16 +1226,16 @@ static void gstdemux_destroy(BaseFilter *iface)
hr
=
IPin_Disconnect
(
&
filter
->
pInputPin
.
pin
.
IPin_iface
);
assert
(
hr
==
S_OK
);
}
pinref
=
IPin_Release
(
&
filter
->
pInputPin
.
pin
.
IPin_iface
);
if
(
pinref
)
{
/* Valgrind could find this, if I kill it here */
ERR
(
"pinref should be null, is %u, destroying anyway
\n
"
,
pinref
);
assert
((
LONG
)
pinref
>
0
);
while
(
pinref
)
pinref
=
IPin_Release
(
&
filter
->
pInputPin
.
pin
.
IPin_iface
);
}
FreeMediaType
(
&
filter
->
pInputPin
.
pin
.
mtCurrent
);
if
(
filter
->
pInputPin
.
pAlloc
)
IMemAllocator_Release
(
filter
->
pInputPin
.
pAlloc
);
filter
->
pInputPin
.
pAlloc
=
NULL
;
if
(
filter
->
pInputPin
.
pReader
)
IAsyncReader_Release
(
filter
->
pInputPin
.
pReader
);
filter
->
pInputPin
.
pReader
=
NULL
;
filter
->
pInputPin
.
pin
.
IPin_iface
.
lpVtbl
=
NULL
;
if
(
filter
->
bus
)
{
gst_bus_set_sync_handler
(
filter
->
bus
,
NULL
,
NULL
,
NULL
);
...
...
@@ -1892,24 +1891,16 @@ static inline GSTInPin *impl_sink_from_IPin(IPin *iface)
return
CONTAINING_RECORD
(
iface
,
GSTInPin
,
pin
.
IPin_iface
);
}
static
ULONG
WINAPI
GSTInPin_
Release
(
IPin
*
iface
)
static
ULONG
WINAPI
GSTInPin_
AddRef
(
IPin
*
iface
)
{
GSTInPin
*
This
=
impl_sink_from_IPin
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
pin
.
refCount
);
GSTInPin
*
pin
=
impl_sink_from_IPin
(
iface
);
return
IBaseFilter_AddRef
(
pin
->
pin
.
pinInfo
.
pFilter
);
}
TRACE
(
"(%p)->() Release from %d
\n
"
,
iface
,
refCount
+
1
);
if
(
!
refCount
)
{
FreeMediaType
(
&
This
->
pin
.
mtCurrent
);
if
(
This
->
pAlloc
)
IMemAllocator_Release
(
This
->
pAlloc
);
This
->
pAlloc
=
NULL
;
if
(
This
->
pReader
)
IAsyncReader_Release
(
This
->
pReader
);
This
->
pReader
=
NULL
;
This
->
pin
.
IPin_iface
.
lpVtbl
=
NULL
;
return
0
;
}
else
return
refCount
;
static
ULONG
WINAPI
GSTInPin_Release
(
IPin
*
iface
)
{
GSTInPin
*
pin
=
impl_sink_from_IPin
(
iface
);
return
IBaseFilter_Release
(
pin
->
pin
.
pinInfo
.
pFilter
);
}
static
HRESULT
WINAPI
GSTInPin_ReceiveConnection
(
IPin
*
iface
,
IPin
*
pReceivePin
,
const
AM_MEDIA_TYPE
*
pmt
)
...
...
@@ -2094,7 +2085,7 @@ static HRESULT WINAPI GSTInPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppE
static
const
IPinVtbl
GST_InputPin_Vtbl
=
{
GSTInPin_QueryInterface
,
BasePinImpl
_AddRef
,
GSTInPin
_AddRef
,
GSTInPin_Release
,
BaseInputPinImpl_Connect
,
GSTInPin_ReceiveConnection
,
...
...
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