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
9ee197f2
Commit
9ee197f2
authored
Jun 18, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wineqtdecoder/qtsplitter: Share source pin and filter reference counts.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c4ba02aa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
37 deletions
+23
-37
qtsplitter.c
dlls/wineqtdecoder/qtsplitter.c
+23
-37
No files found.
dlls/wineqtdecoder/qtsplitter.c
View file @
9ee197f2
...
@@ -779,23 +779,22 @@ static const IBaseFilterVtbl QT_Vtbl = {
...
@@ -779,23 +779,22 @@ static const IBaseFilterVtbl QT_Vtbl = {
BaseFilterImpl_QueryVendorInfo
BaseFilterImpl_QueryVendorInfo
};
};
static
HRESULT
break_source_connection
(
BaseOutp
utPin
*
pin
)
static
void
free_source_pin
(
QTO
utPin
*
pin
)
{
{
HRESULT
hr
;
EnterCriticalSection
(
pin
->
pin
.
pin
.
pCritSec
);
if
(
pin
->
pin
.
pin
.
pConnectedTo
)
EnterCriticalSection
(
pin
->
pin
.
pCritSec
);
if
(
!
pin
->
pin
.
pConnectedTo
||
!
pin
->
pMemInputPin
)
hr
=
VFW_E_NOT_CONNECTED
;
else
{
{
hr
=
IMemAllocator_Decommit
(
pin
->
pAllocator
);
if
(
SUCCEEDED
(
IMemAllocator_Decommit
(
pin
->
pin
.
pAllocator
)))
if
(
SUCCEEDED
(
hr
))
IPin_Disconnect
(
pin
->
pin
.
pin
.
pConnectedTo
);
hr
=
IPin_Disconnect
(
pin
->
pin
.
pConnectedTo
);
IPin_Disconnect
(
&
pin
->
pin
.
pin
.
IPin_iface
);
IPin_Disconnect
(
&
pin
->
pin
.
IPin_iface
);
}
}
LeaveCriticalSection
(
pin
->
pin
.
pCritSec
);
LeaveCriticalSection
(
pin
->
pin
.
p
in
.
p
CritSec
);
return
hr
;
DeleteMediaType
(
pin
->
pmt
);
FreeMediaType
(
&
pin
->
pin
.
pin
.
mtCurrent
);
if
(
pin
->
pin
.
pAllocator
)
IMemAllocator_Release
(
pin
->
pin
.
pAllocator
);
CoTaskMemFree
(
pin
);
}
}
/*
/*
...
@@ -803,23 +802,16 @@ static HRESULT break_source_connection(BaseOutputPin *pin)
...
@@ -803,23 +802,16 @@ static HRESULT break_source_connection(BaseOutputPin *pin)
*/
*/
static
HRESULT
QT_RemoveOutputPins
(
QTSplitter
*
This
)
static
HRESULT
QT_RemoveOutputPins
(
QTSplitter
*
This
)
{
{
HRESULT
hr
;
TRACE
(
"(%p)
\n
"
,
This
);
if
(
This
->
pVideo_Pin
)
if
(
This
->
pVideo_Pin
)
{
{
OutputQueue_Destroy
(
This
->
pVideo_Pin
->
queue
);
OutputQueue_Destroy
(
This
->
pVideo_Pin
->
queue
);
hr
=
break_source_connection
(
&
This
->
pVideo_Pin
->
pin
);
free_source_pin
(
This
->
pVideo_Pin
);
TRACE
(
"Disconnect: %08x
\n
"
,
hr
);
IPin_Release
(
&
This
->
pVideo_Pin
->
pin
.
pin
.
IPin_iface
);
This
->
pVideo_Pin
=
NULL
;
This
->
pVideo_Pin
=
NULL
;
}
}
if
(
This
->
pAudio_Pin
)
if
(
This
->
pAudio_Pin
)
{
{
OutputQueue_Destroy
(
This
->
pAudio_Pin
->
queue
);
OutputQueue_Destroy
(
This
->
pAudio_Pin
->
queue
);
hr
=
break_source_connection
(
&
This
->
pAudio_Pin
->
pin
);
free_source_pin
(
This
->
pAudio_Pin
);
TRACE
(
"Disconnect: %08x
\n
"
,
hr
);
IPin_Release
(
&
This
->
pAudio_Pin
->
pin
.
pin
.
IPin_iface
);
This
->
pAudio_Pin
=
NULL
;
This
->
pAudio_Pin
=
NULL
;
}
}
...
@@ -1340,22 +1332,16 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
...
@@ -1340,22 +1332,16 @@ static HRESULT WINAPI QTOutPin_QueryInterface(IPin *iface, REFIID riid, void **p
return
E_NOINTERFACE
;
return
E_NOINTERFACE
;
}
}
static
ULONG
WINAPI
QTOutPin_
Release
(
IPin
*
iface
)
static
ULONG
WINAPI
QTOutPin_
AddRef
(
IPin
*
iface
)
{
{
QTOutPin
*
This
=
impl_QTOutPin_from_IPin
(
iface
);
QTOutPin
*
pin
=
impl_QTOutPin_from_IPin
(
iface
);
ULONG
refCount
=
InterlockedDecrement
(
&
This
->
pin
.
pin
.
refCount
);
return
IBaseFilter_AddRef
(
pin
->
pin
.
pin
.
pinInfo
.
pFilter
);
TRACE
(
"(%p)->() Release from %d
\n
"
,
iface
,
refCount
+
1
);
}
if
(
!
refCount
)
static
ULONG
WINAPI
QTOutPin_Release
(
IPin
*
iface
)
{
{
DeleteMediaType
(
This
->
pmt
);
QTOutPin
*
pin
=
impl_QTOutPin_from_IPin
(
iface
);
FreeMediaType
(
&
This
->
pin
.
pin
.
mtCurrent
);
return
IBaseFilter_Release
(
pin
->
pin
.
pin
.
pinInfo
.
pFilter
);
if
(
This
->
pin
.
pAllocator
)
IMemAllocator_Release
(
This
->
pin
.
pAllocator
);
CoTaskMemFree
(
This
);
return
0
;
}
return
refCount
;
}
}
static
HRESULT
WINAPI
QTOutPin_CheckMediaType
(
BasePin
*
base
,
const
AM_MEDIA_TYPE
*
amt
)
static
HRESULT
WINAPI
QTOutPin_CheckMediaType
(
BasePin
*
base
,
const
AM_MEDIA_TYPE
*
amt
)
...
@@ -1406,7 +1392,7 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputPi
...
@@ -1406,7 +1392,7 @@ static HRESULT WINAPI QTOutPin_DecideAllocator(BaseOutputPin *iface, IMemInputPi
static
const
IPinVtbl
QT_OutputPin_Vtbl
=
{
static
const
IPinVtbl
QT_OutputPin_Vtbl
=
{
QTOutPin_QueryInterface
,
QTOutPin_QueryInterface
,
BasePinImpl
_AddRef
,
QTOutPin
_AddRef
,
QTOutPin_Release
,
QTOutPin_Release
,
BaseOutputPinImpl_Connect
,
BaseOutputPinImpl_Connect
,
BaseOutputPinImpl_ReceiveConnection
,
BaseOutputPinImpl_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