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
690838a0
Commit
690838a0
authored
Jun 11, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 11, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Don't increment the pin reference count in filter_get_pin().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6edee725
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
39 additions
and
98 deletions
+39
-98
avico.c
dlls/qcap/avico.c
+4
-9
avimux.c
dlls/qcap/avimux.c
+4
-11
smartteefilter.c
dlls/qcap/smartteefilter.c
+5
-10
vfwcapture.c
dlls/qcap/vfwcapture.c
+0
-1
samplegrabber.c
dlls/qedit/samplegrabber.c
+4
-9
filesource.c
dlls/quartz/filesource.c
+4
-6
parser.c
dlls/quartz/parser.c
+3
-5
enumpins.c
dlls/strmbase/enumpins.c
+8
-16
filter.c
dlls/strmbase/filter.c
+2
-6
renderer.c
dlls/strmbase/renderer.c
+0
-1
transform.c
dlls/strmbase/transform.c
+0
-1
gstdemux.c
dlls/winegstreamer/gstdemux.c
+5
-11
qtsplitter.c
dlls/wineqtdecoder/qtsplitter.c
+0
-12
No files found.
dlls/qcap/avico.c
View file @
690838a0
...
...
@@ -180,18 +180,13 @@ static const IBaseFilterVtbl AVICompressorVtbl = {
static
IPin
*
avi_compressor_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
AVICompressor
*
This
=
impl_from_BaseFilter
(
iface
);
IPin
*
ret
;
AVICompressor
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
==
0
)
ret
=
&
This
->
in
->
pin
.
IPin_iface
;
ret
urn
&
filter
->
in
->
pin
.
IPin_iface
;
else
if
(
index
==
1
)
ret
=
&
This
->
out
->
pin
.
IPin_iface
;
else
return
NULL
;
IPin_AddRef
(
ret
);
return
ret
;
return
&
filter
->
out
->
pin
.
IPin_iface
;
return
NULL
;
}
static
void
avi_compressor_destroy
(
BaseFilter
*
iface
)
...
...
dlls/qcap/avimux.c
View file @
690838a0
...
...
@@ -118,19 +118,12 @@ static inline AviMux* impl_from_BaseFilter(BaseFilter *filter)
static
IPin
*
avi_mux_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
AviMux
*
This
=
impl_from_BaseFilter
(
iface
);
AviMux
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
!
index
)
{
IPin_AddRef
(
&
This
->
out
->
pin
.
pin
.
IPin_iface
);
return
&
This
->
out
->
pin
.
pin
.
IPin_iface
;
}
else
if
(
index
<=
This
->
input_pin_no
)
{
IPin_AddRef
(
&
This
->
in
[
index
-
1
]
->
pin
.
pin
.
IPin_iface
);
return
&
This
->
in
[
index
-
1
]
->
pin
.
pin
.
IPin_iface
;
}
return
&
filter
->
out
->
pin
.
pin
.
IPin_iface
;
else
if
(
index
<=
filter
->
input_pin_no
)
return
&
filter
->
in
[
index
-
1
]
->
pin
.
pin
.
IPin_iface
;
return
NULL
;
}
...
...
dlls/qcap/smartteefilter.c
View file @
690838a0
...
...
@@ -120,20 +120,15 @@ static const IBaseFilterVtbl SmartTeeFilterVtbl = {
static
IPin
*
smart_tee_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
SmartTeeFilter
*
This
=
impl_from_BaseFilter
(
iface
);
IPin
*
ret
;
SmartTeeFilter
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
==
0
)
ret
=
&
This
->
input
->
pin
.
IPin_iface
;
ret
urn
&
filter
->
input
->
pin
.
IPin_iface
;
else
if
(
index
==
1
)
ret
=
&
This
->
capture
->
pin
.
IPin_iface
;
ret
urn
&
filter
->
capture
->
pin
.
IPin_iface
;
else
if
(
index
==
2
)
ret
=
&
This
->
preview
->
pin
.
IPin_iface
;
else
return
NULL
;
IPin_AddRef
(
ret
);
return
ret
;
return
&
filter
->
preview
->
pin
.
IPin_iface
;
return
NULL
;
}
static
void
smart_tee_destroy
(
BaseFilter
*
iface
)
...
...
dlls/qcap/vfwcapture.c
View file @
690838a0
...
...
@@ -104,7 +104,6 @@ static IPin *vfw_capture_get_pin(BaseFilter *iface, unsigned int index)
if
(
index
>=
1
)
return
NULL
;
IPin_AddRef
(
This
->
pOutputPin
);
return
This
->
pOutputPin
;
}
...
...
dlls/qedit/samplegrabber.c
View file @
690838a0
...
...
@@ -275,18 +275,13 @@ static void SampleGrabber_cleanup(SG_Impl *This)
static
IPin
*
sample_grabber_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
SG_Impl
*
This
=
impl_from_BaseFilter
(
iface
);
IPin
*
pin
;
SG_Impl
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
==
0
)
pin
=
&
This
->
pin_in
.
IPin_iface
;
return
&
filter
->
pin_in
.
IPin_iface
;
else
if
(
index
==
1
)
pin
=
&
This
->
pin_out
.
IPin_iface
;
else
return
NULL
;
IPin_AddRef
(
pin
);
return
pin
;
return
&
filter
->
pin_out
.
IPin_iface
;
return
NULL
;
}
static
void
sample_grabber_destroy
(
BaseFilter
*
iface
)
...
...
dlls/quartz/filesource.c
View file @
690838a0
...
...
@@ -394,13 +394,11 @@ HRESULT GetClassMediaFile(IAsyncReader * pReader, LPCOLESTR pszFileName, GUID *
static
IPin
*
async_reader_get_pin
(
BaseFilter
*
iface
,
unsigned
int
index
)
{
AsyncReader
*
This
=
impl_from_BaseFilter
(
iface
);
if
(
index
>=
1
||
!
This
->
pOutputPin
)
return
NULL
;
AsyncReader
*
filter
=
impl_from_BaseFilter
(
iface
);
IPin_AddRef
(
This
->
pOutputPin
);
return
This
->
pOutputPin
;
if
(
!
index
&&
filter
->
pOutputPin
)
return
filter
->
pOutputPin
;
return
NULL
;
}
static
void
async_reader_destroy
(
BaseFilter
*
iface
)
...
...
dlls/quartz/parser.c
View file @
690838a0
...
...
@@ -66,11 +66,9 @@ IPin *parser_get_pin(BaseFilter *iface, unsigned int index)
{
ParserImpl
*
filter
=
impl_from_BaseFilter
(
iface
);
if
(
index
>
filter
->
cStreams
)
return
NULL
;
IPin_AddRef
(
filter
->
ppPins
[
index
]);
return
filter
->
ppPins
[
index
];
if
(
index
<=
filter
->
cStreams
)
return
filter
->
ppPins
[
index
];
return
NULL
;
}
HRESULT
Parser_Create
(
ParserImpl
*
pParser
,
const
IBaseFilterVtbl
*
vtbl
,
IUnknown
*
outer
,
...
...
dlls/strmbase/enumpins.c
View file @
690838a0
...
...
@@ -60,10 +60,7 @@ HRESULT enum_pins_create(BaseFilter *base, IEnumPins **out)
object
->
Version
=
base
->
pin_version
;
while
((
pin
=
base
->
pFuncsTable
->
filter_get_pin
(
base
,
object
->
count
)))
{
IPin_Release
(
pin
);
++
object
->
count
;
}
TRACE
(
"Created enumerator %p.
\n
"
,
object
);
*
out
=
&
object
->
IEnumPins_iface
;
...
...
@@ -122,7 +119,7 @@ static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins * iface)
static
HRESULT
WINAPI
IEnumPinsImpl_Next
(
IEnumPins
*
iface
,
ULONG
cPins
,
IPin
**
ppPins
,
ULONG
*
pcFetched
)
{
IEnumPinsImpl
*
This
=
impl_from_IEnumPins
(
iface
);
ULONG
i
=
0
;
ULONG
i
;
TRACE
(
"(%p)->(%u, %p, %p)
\n
"
,
iface
,
cPins
,
ppPins
,
pcFetched
);
...
...
@@ -138,16 +135,14 @@ static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins * iface, ULONG cPins, IPin **
if
(
This
->
Version
!=
This
->
base
->
pin_version
)
return
VFW_E_ENUM_OUT_OF_SYNC
;
while
(
i
<
cPins
)
for
(
i
=
0
;
i
<
cPins
;
++
i
)
{
IPin
*
pin
;
pin
=
This
->
base
->
pFuncsTable
->
filter_get_pin
(
This
->
base
,
This
->
uIndex
+
i
);
if
(
!
pin
)
break
;
else
ppPins
[
i
]
=
pin
;
++
i
;
IPin
*
pin
=
This
->
base
->
pFuncsTable
->
filter_get_pin
(
This
->
base
,
This
->
uIndex
+
i
);
if
(
!
pin
)
break
;
IPin_AddRef
(
ppPins
[
i
]
=
pin
);
}
if
(
pcFetched
)
...
...
@@ -186,10 +181,7 @@ static HRESULT WINAPI IEnumPinsImpl_Reset(IEnumPins *iface)
{
enum_pins
->
count
=
0
;
while
((
pin
=
enum_pins
->
base
->
pFuncsTable
->
filter_get_pin
(
enum_pins
->
base
,
enum_pins
->
count
)))
{
IPin_Release
(
pin
);
++
enum_pins
->
count
;
}
}
enum_pins
->
Version
=
enum_pins
->
base
->
pin_version
;
...
...
dlls/strmbase/filter.c
View file @
690838a0
...
...
@@ -194,19 +194,15 @@ HRESULT WINAPI BaseFilterImpl_FindPin(IBaseFilter *iface, const WCHAR *id, IPin
{
hr
=
IPin_QueryPinInfo
(
pin
,
&
info
);
if
(
FAILED
(
hr
))
{
IPin_Release
(
pin
);
return
hr
;
}
if
(
info
.
pFilter
)
IBaseFilter_Release
(
info
.
pFilter
);
if
(
!
lstrcmpW
(
id
,
info
.
achName
))
{
*
ret
=
pin
;
IPin_AddRef
(
*
ret
=
pin
)
;
return
S_OK
;
}
IPin_Release
(
pin
);
}
return
VFW_E_NOT_FOUND
;
...
...
dlls/strmbase/renderer.c
View file @
690838a0
...
...
@@ -190,7 +190,6 @@ static IPin *renderer_get_pin(BaseFilter *iface, unsigned int index)
if
(
index
>=
1
)
return
NULL
;
IPin_AddRef
(
&
This
->
pInputPin
->
pin
.
IPin_iface
);
return
&
This
->
pInputPin
->
pin
.
IPin_iface
;
}
...
...
dlls/strmbase/transform.c
View file @
690838a0
...
...
@@ -135,7 +135,6 @@ static IPin *transform_get_pin(BaseFilter *iface, unsigned int index)
if
(
index
>=
2
)
return
NULL
;
IPin_AddRef
(
filter
->
ppPins
[
index
]);
return
filter
->
ppPins
[
index
];
}
...
...
dlls/winegstreamer/gstdemux.c
View file @
690838a0
...
...
@@ -1198,19 +1198,13 @@ static inline GSTOutPin *impl_from_IMediaSeeking( IMediaSeeking *iface )
static
IPin
*
gstdemux_get_pin
(
BaseFilter
*
base
,
unsigned
int
index
)
{
GSTImpl
*
This
=
impl_from_IBaseFilter
(
&
base
->
IBaseFilter_iface
);
IPin
*
pin
;
if
(
index
>
This
->
cStreams
)
return
NULL
;
GSTImpl
*
filter
=
impl_from_IBaseFilter
(
&
base
->
IBaseFilter_iface
);
if
(
!
index
)
pin
=
&
This
->
pInputPin
.
pin
.
IPin_iface
;
else
pin
=
&
This
->
ppPins
[
index
-
1
]
->
pin
.
pin
.
IPin_iface
;
IPin_AddRef
(
pin
);
return
pin
;
return
&
filter
->
pInputPin
.
pin
.
IPin_iface
;
else
if
(
index
<=
filter
->
cStreams
)
return
&
filter
->
ppPins
[
index
-
1
]
->
pin
.
pin
.
IPin_iface
;
return
NULL
;
}
static
void
gstdemux_destroy
(
BaseFilter
*
iface
)
...
...
dlls/wineqtdecoder/qtsplitter.c
View file @
690838a0
...
...
@@ -207,28 +207,16 @@ static IPin *qt_splitter_get_pin(BaseFilter *base, unsigned int index)
QTSplitter
*
filter
=
impl_from_BaseFilter
(
base
);
if
(
index
==
0
)
{
IPin_AddRef
(
&
filter
->
pInputPin
.
pin
.
IPin_iface
);
return
&
filter
->
pInputPin
.
pin
.
IPin_iface
;
}
else
if
(
index
==
1
)
{
if
(
filter
->
pVideo_Pin
)
{
IPin_AddRef
(
&
filter
->
pVideo_Pin
->
pin
.
pin
.
IPin_iface
);
return
&
filter
->
pVideo_Pin
->
pin
.
pin
.
IPin_iface
;
}
else
if
(
filter
->
pAudio_Pin
)
{
IPin_AddRef
(
&
filter
->
pAudio_Pin
->
pin
.
pin
.
IPin_iface
);
return
&
filter
->
pAudio_Pin
->
pin
.
pin
.
IPin_iface
;
}
}
else
if
(
index
==
2
&&
filter
->
pVideo_Pin
&&
filter
->
pAudio_Pin
)
{
IPin_AddRef
(
&
filter
->
pAudio_Pin
->
pin
.
pin
.
IPin_iface
);
return
&
filter
->
pAudio_Pin
->
pin
.
pin
.
IPin_iface
;
}
return
NULL
;
}
...
...
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