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
2a6037e2
Commit
2a6037e2
authored
Nov 18, 2019
by
Zebediah Figura
Committed by
Alexandre Julliard
Nov 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Forbid (dis)connecting pins if the filter is not stopped.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
03f0479c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
pin.c
dlls/strmbase/pin.c
+21
-0
No files found.
dlls/strmbase/pin.c
View file @
2a6037e2
...
...
@@ -366,6 +366,13 @@ HRESULT WINAPI BaseOutputPinImpl_Connect(IPin * iface, IPin * pReceivePin, const
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pin
.
filter
->
state
!=
State_Stopped
)
{
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
WARN
(
"Filter is not stopped; returning VFW_E_NOT_STOPPED.
\n
"
);
return
VFW_E_NOT_STOPPED
;
}
/* if we have been a specific type to connect with, then we can either connect
* with that or fail. We cannot choose different AM_MEDIA_TYPE */
if
(
pmt
&&
!
IsEqualGUID
(
&
pmt
->
majortype
,
&
GUID_NULL
)
&&
!
IsEqualGUID
(
&
pmt
->
subtype
,
&
GUID_NULL
))
...
...
@@ -447,6 +454,13 @@ HRESULT WINAPI BaseOutputPinImpl_Disconnect(IPin * iface)
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pin
.
filter
->
state
!=
State_Stopped
)
{
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
WARN
(
"Filter is not stopped; returning VFW_E_NOT_STOPPED.
\n
"
);
return
VFW_E_NOT_STOPPED
;
}
if
(
This
->
pMemInputPin
)
{
IMemInputPin_Release
(
This
->
pMemInputPin
);
...
...
@@ -730,6 +744,13 @@ HRESULT WINAPI BaseInputPinImpl_ReceiveConnection(IPin * iface, IPin * pReceiveP
EnterCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
{
if
(
This
->
pin
.
filter
->
state
!=
State_Stopped
)
{
LeaveCriticalSection
(
&
This
->
pin
.
filter
->
csFilter
);
WARN
(
"Filter is not stopped; returning VFW_E_NOT_STOPPED.
\n
"
);
return
VFW_E_NOT_STOPPED
;
}
if
(
This
->
pin
.
peer
)
hr
=
VFW_E_ALREADY_CONNECTED
;
...
...
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