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
f194d99d
Commit
f194d99d
authored
Jun 17, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 18, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineqtdecoder: 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
8983528f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
28 deletions
+17
-28
qtsplitter.c
dlls/wineqtdecoder/qtsplitter.c
+17
-28
No files found.
dlls/wineqtdecoder/qtsplitter.c
View file @
f194d99d
...
...
@@ -225,7 +225,6 @@ static void qt_splitter_destroy(BaseFilter *iface)
{
QTSplitter
*
filter
=
impl_from_BaseFilter
(
iface
);
IPin
*
peer
=
NULL
;
ULONG
pinref
;
EnterCriticalSection
(
&
filter
->
csReceive
);
/* Don't need to clean up output pins, disconnecting input pin will do that */
...
...
@@ -235,15 +234,15 @@ static void qt_splitter_destroy(BaseFilter *iface)
IPin_Disconnect
(
peer
);
IPin_Release
(
peer
);
}
pinref
=
IPin_Release
(
&
filter
->
pInputPin
.
pin
.
IPin_iface
);
if
(
pinref
)
{
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
->
pQTMovie
)
{
...
...
@@ -833,26 +832,16 @@ static inline QTInPin *impl_from_IPin( IPin *iface )
return
CONTAINING_RECORD
(
iface
,
QTInPin
,
pin
.
IPin_iface
);
}
static
ULONG
WINAPI
QTInPin_
Release
(
IPin
*
iface
)
static
ULONG
WINAPI
QTInPin_
AddRef
(
IPin
*
iface
)
{
QTInPin
*
This
=
impl_from_IPin
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
pin
.
refCount
);
QTInPin
*
pin
=
impl_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
QTInPin_Release
(
IPin
*
iface
)
{
QTInPin
*
pin
=
impl_from_IPin
(
iface
);
return
IBaseFilter_Release
(
pin
->
pin
.
pinInfo
.
pFilter
);
}
static
HRESULT
QT_Process_Video_Track
(
QTSplitter
*
filter
,
Track
trk
)
...
...
@@ -1288,7 +1277,7 @@ static HRESULT WINAPI QTInPin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEn
static
const
IPinVtbl
QT_InputPin_Vtbl
=
{
QTInPin_QueryInterface
,
BasePinImpl
_AddRef
,
QTInPin
_AddRef
,
QTInPin_Release
,
BaseInputPinImpl_Connect
,
QTInPin_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