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
0c1d9312
Commit
0c1d9312
authored
Apr 05, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Check the peer direction in source_Connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
bd80194a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
qcap.c
dlls/qcap/tests/qcap.c
+1
-1
pin.c
dlls/strmbase/pin.c
+7
-4
No files found.
dlls/qcap/tests/qcap.c
View file @
0c1d9312
...
...
@@ -1433,7 +1433,7 @@ static void test_AviMux(char *arg)
pin
,
&
source_filter
.
IPin_iface
);
hr
=
IPin_Connect
(
avimux_out
,
&
source_filter
.
IPin_iface
,
NULL
);
todo_wine
ok
(
hr
==
VFW_E_INVALID_DIRECTION
,
"Connect returned %x
\n
"
,
hr
);
ok
(
hr
==
VFW_E_INVALID_DIRECTION
,
"Connect returned %x
\n
"
,
hr
);
hr
=
IBaseFilter_JoinFilterGraph
(
avimux
,
(
IFilterGraph
*
)
&
GraphBuilder
,
NULL
);
ok
(
hr
==
S_OK
,
"JoinFilterGraph returned %x
\n
"
,
hr
);
...
...
dlls/strmbase/pin.c
View file @
0c1d9312
...
...
@@ -447,6 +447,7 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
struct
strmbase_source
*
pin
=
impl_source_from_IPin
(
iface
);
AM_MEDIA_TYPE
candidate
,
*
candidate_ptr
;
IEnumMediaTypes
*
enummt
;
PIN_DIRECTION
dir
;
unsigned
int
i
;
ULONG
count
;
HRESULT
hr
;
...
...
@@ -458,10 +459,12 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
if
(
!
peer
)
return
E_POINTER
;
/* If we try to connect to ourselves, we will definitely deadlock.
* There are other cases where we could deadlock too, but this
* catches the obvious case */
assert
(
peer
!=
iface
);
IPin_QueryDirection
(
peer
,
&
dir
);
if
(
dir
!=
PINDIR_INPUT
)
{
WARN
(
"Attempt to connect to another source pin, returning VFW_E_INVALID_DIRECTION.
\n
"
);
return
VFW_E_INVALID_DIRECTION
;
}
EnterCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
...
...
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