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
009bbfa6
Commit
009bbfa6
authored
Sep 20, 2018
by
Zebediah Figura
Committed by
Alexandre Julliard
Sep 20, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/filtergraph: Check pin name instead of id in connect_output_pin().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a638c327
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
44 additions
and
17 deletions
+44
-17
filtergraph.c
dlls/quartz/filtergraph.c
+6
-14
filtergraph.c
dlls/quartz/tests/filtergraph.c
+38
-3
No files found.
dlls/quartz/filtergraph.c
View file @
009bbfa6
...
...
@@ -1041,9 +1041,8 @@ static HRESULT GetInternalConnections(IBaseFilter* pfilter, IPin* pinputpin, IPi
static
HRESULT
connect_output_pin
(
IFilterGraphImpl
*
graph
,
IBaseFilter
*
filter
,
IPin
*
sink
)
{
IEnumPins
*
enumpins
;
PIN_
DIRECTION
dir
;
PIN_
INFO
info
;
HRESULT
hr
;
WCHAR
*
id
;
IPin
*
pin
;
hr
=
IBaseFilter_EnumPins
(
filter
,
&
enumpins
);
...
...
@@ -1052,20 +1051,13 @@ static HRESULT connect_output_pin(IFilterGraphImpl *graph, IBaseFilter *filter,
while
(
IEnumPins_Next
(
enumpins
,
1
,
&
pin
,
NULL
)
==
S_OK
)
{
IPin_QueryDirection
(
pin
,
&
dir
);
if
(
dir
==
PINDIR_OUTPUT
)
IPin_QueryPinInfo
(
pin
,
&
info
);
IBaseFilter_Release
(
info
.
pFilter
);
if
(
info
.
dir
==
PINDIR_OUTPUT
)
{
hr
=
IPin_QueryId
(
pin
,
&
id
);
if
(
FAILED
(
hr
))
{
IPin_Release
(
pin
);
IEnumPins_Release
(
enumpins
);
return
hr
;
}
if
(
id
[
0
]
==
'~'
)
if
(
info
.
achName
[
0
]
==
'~'
)
{
TRACE
(
"Skipping non-rendered pin %s.
\n
"
,
debugstr_w
(
i
d
));
TRACE
(
"Skipping non-rendered pin %s.
\n
"
,
debugstr_w
(
i
nfo
.
achName
));
IPin_Release
(
pin
);
IEnumPins_Release
(
enumpins
);
return
E_FAIL
;
...
...
dlls/quartz/tests/filtergraph.c
View file @
009bbfa6
...
...
@@ -768,6 +768,8 @@ struct testpin
IBaseFilter
*
filter
;
IPin
*
peer
;
AM_MEDIA_TYPE
*
mt
;
WCHAR
name
[
10
];
WCHAR
id
[
10
];
IEnumMediaTypes
IEnumMediaTypes_iface
;
const
AM_MEDIA_TYPE
*
types
;
...
...
@@ -928,7 +930,7 @@ static HRESULT WINAPI testpin_QueryPinInfo(IPin *iface, PIN_INFO *info)
info
->
pFilter
=
pin
->
filter
;
IBaseFilter_AddRef
(
pin
->
filter
);
info
->
dir
=
pin
->
dir
;
info
->
achName
[
0
]
=
0
;
lstrcpyW
(
info
->
achName
,
pin
->
name
)
;
return
S_OK
;
}
...
...
@@ -944,9 +946,10 @@ static HRESULT WINAPI testpin_QueryDirection(IPin *iface, PIN_DIRECTION *dir)
static
HRESULT
WINAPI
testpin_QueryId
(
IPin
*
iface
,
WCHAR
**
id
)
{
struct
testpin
*
pin
=
impl_from_IPin
(
iface
);
if
(
winetest_debug
>
1
)
trace
(
"%p->QueryId()
\n
"
,
iface
);
*
id
=
CoTaskMemAlloc
(
1
);
(
*
id
)[
0
]
=
0
;
*
id
=
CoTaskMemAlloc
(
1
1
);
lstrcpyW
(
*
id
,
pin
->
id
)
;
return
S_OK
;
}
...
...
@@ -1770,6 +1773,38 @@ todo_wine
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
sink_pin
.
IPin_iface
);
/* A pin whose name (not ID) begins with a tilde is not connected. */
parser1_pins
[
1
].
name
[
0
]
=
'~'
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
ok
(
hr
==
VFW_E_CANNOT_CONNECT
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
source_pin
.
peer
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
parser1
.
pin_count
=
3
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
todo_wine
{
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
2
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
}
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
sink_pin
.
IPin_iface
);
parser1
.
pin_count
=
2
;
parser1_pins
[
1
].
name
[
0
]
=
0
;
parser1_pins
[
1
].
id
[
0
]
=
'~'
;
hr
=
IFilterGraph2_Connect
(
graph
,
&
source_pin
.
IPin_iface
,
&
sink_pin
.
IPin_iface
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
source_pin
.
peer
==
&
parser1_pins
[
0
].
IPin_iface
,
"Got peer %p.
\n
"
,
source_pin
.
peer
);
ok
(
sink_pin
.
peer
==
&
parser1_pins
[
1
].
IPin_iface
,
"Got peer %p.
\n
"
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
source_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
source_pin
.
IPin_iface
);
IFilterGraph2_Disconnect
(
graph
,
sink_pin
.
peer
);
IFilterGraph2_Disconnect
(
graph
,
&
sink_pin
.
IPin_iface
);
ref
=
IFilterGraph2_Release
(
graph
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
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