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
a0251e33
Commit
a0251e33
authored
Apr 16, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 22, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Make the pin_query_accept() callback optional.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
38f5f364
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
pin.c
dlls/strmbase/pin.c
+10
-3
No files found.
dlls/strmbase/pin.c
View file @
a0251e33
...
...
@@ -391,6 +391,13 @@ static HRESULT WINAPI pin_QueryId(IPin *iface, WCHAR **id)
return
S_OK
;
}
static
BOOL
query_accept
(
struct
strmbase_pin
*
pin
,
const
AM_MEDIA_TYPE
*
mt
)
{
if
(
pin
->
ops
->
pin_query_accept
&&
pin
->
ops
->
pin_query_accept
(
pin
,
mt
)
!=
S_OK
)
return
FALSE
;
return
TRUE
;
}
static
HRESULT
WINAPI
pin_QueryAccept
(
IPin
*
iface
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
strmbase_pin
*
pin
=
impl_from_IPin
(
iface
);
...
...
@@ -398,7 +405,7 @@ static HRESULT WINAPI pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *mt)
TRACE
(
"pin %p %s:%s, mt %p.
\n
"
,
pin
,
debugstr_w
(
pin
->
filter
->
name
),
debugstr_w
(
pin
->
name
),
mt
);
strmbase_dump_media_type
(
mt
);
return
(
pin
->
ops
->
pin_query_accept
(
pin
,
mt
)
==
S_OK
?
S_OK
:
S_FALSE
)
;
return
query_accept
(
pin
,
mt
)
?
S_OK
:
S_FALSE
;
}
static
HRESULT
WINAPI
pin_EnumMediaTypes
(
IPin
*
iface
,
IEnumMediaTypes
**
enum_media_types
)
...
...
@@ -763,7 +770,7 @@ HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *This,
TRACE
(
"(%p)->(%p, %p)
\n
"
,
This
,
pReceivePin
,
pmt
);
if
(
This
->
pFuncsTable
->
base
.
pin_query_accept
(
&
This
->
pin
,
pmt
)
!=
S_OK
)
if
(
!
query_accept
(
&
This
->
pin
,
pmt
)
)
return
VFW_E_TYPE_NOT_ACCEPTED
;
This
->
pin
.
peer
=
pReceivePin
;
...
...
@@ -871,7 +878,7 @@ static HRESULT WINAPI sink_ReceiveConnection(IPin *iface, IPin *pReceivePin, con
if
(
This
->
pin
.
peer
)
hr
=
VFW_E_ALREADY_CONNECTED
;
if
(
SUCCEEDED
(
hr
)
&&
This
->
pin
.
ops
->
pin_query_accept
(
&
This
->
pin
,
pmt
)
!=
S_OK
)
if
(
SUCCEEDED
(
hr
)
&&
!
query_accept
(
&
This
->
pin
,
pmt
)
)
hr
=
VFW_E_TYPE_NOT_ACCEPTED
;
/* FIXME: shouldn't we just map common errors onto
* VFW_E_TYPE_NOT_ACCEPTED and pass the value on otherwise? */
...
...
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