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
e14c5430
Commit
e14c5430
authored
Feb 05, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
strmbase: Access our own media types directly in source_Connect().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1d1ca2f8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
19 deletions
+15
-19
pin.c
dlls/strmbase/pin.c
+15
-19
No files found.
dlls/strmbase/pin.c
View file @
e14c5430
...
...
@@ -431,8 +431,9 @@ static inline struct strmbase_source *impl_source_from_IPin( IPin *iface )
static
HRESULT
WINAPI
source_Connect
(
IPin
*
iface
,
IPin
*
peer
,
const
AM_MEDIA_TYPE
*
mt
)
{
struct
strmbase_source
*
pin
=
impl_source_from_IPin
(
iface
);
AM_MEDIA_TYPE
*
candidate
;
AM_MEDIA_TYPE
candidate
,
*
candidate_ptr
;
IEnumMediaTypes
*
enummt
;
unsigned
int
i
;
ULONG
count
;
HRESULT
hr
;
...
...
@@ -464,37 +465,32 @@ static HRESULT WINAPI source_Connect(IPin *iface, IPin *peer, const AM_MEDIA_TYP
return
hr
;
}
if
(
SUCCEEDED
(
IPin_EnumMediaTypes
(
iface
,
&
enummt
))
)
for
(
i
=
0
;
pin
->
pFuncsTable
->
base
.
pin_get_media_type
(
&
pin
->
pin
,
i
,
&
candidate
)
==
S_OK
;
++
i
)
{
while
(
IEnumMediaTypes_Next
(
enummt
,
1
,
&
candidate
,
NULL
)
==
S_OK
)
strmbase_dump_media_type
(
&
candidate
);
if
((
!
mt
||
CompareMediaTypes
(
mt
,
&
candidate
,
TRUE
))
&&
pin
->
pFuncsTable
->
pfnAttemptConnection
(
pin
,
peer
,
&
candidate
)
==
S_OK
)
{
if
((
!
mt
||
CompareMediaTypes
(
mt
,
candidate
,
TRUE
))
&&
pin
->
pFuncsTable
->
pfnAttemptConnection
(
pin
,
peer
,
candidate
)
==
S_OK
)
{
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
DeleteMediaType
(
candidate
);
IEnumMediaTypes_Release
(
enummt
);
return
S_OK
;
}
DeleteMediaType
(
candidate
);
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
FreeMediaType
(
&
candidate
);
return
S_OK
;
}
IEnumMediaTypes_Release
(
enummt
);
FreeMediaType
(
&
candidate
);
}
if
(
SUCCEEDED
(
IPin_EnumMediaTypes
(
peer
,
&
enummt
)))
{
while
(
IEnumMediaTypes_Next
(
enummt
,
1
,
&
candidate
,
&
count
)
==
S_OK
)
while
(
IEnumMediaTypes_Next
(
enummt
,
1
,
&
candidate
_ptr
,
&
count
)
==
S_OK
)
{
if
((
!
mt
||
CompareMediaTypes
(
mt
,
candidate
,
TRUE
))
&&
pin
->
pFuncsTable
->
pfnAttemptConnection
(
pin
,
peer
,
candidate
)
==
S_OK
)
if
((
!
mt
||
CompareMediaTypes
(
mt
,
candidate
_ptr
,
TRUE
))
&&
pin
->
pFuncsTable
->
pfnAttemptConnection
(
pin
,
peer
,
candidate
_ptr
)
==
S_OK
)
{
LeaveCriticalSection
(
&
pin
->
pin
.
filter
->
csFilter
);
DeleteMediaType
(
candidate
);
DeleteMediaType
(
candidate
_ptr
);
IEnumMediaTypes_Release
(
enummt
);
return
S_OK
;
}
DeleteMediaType
(
candidate
);
DeleteMediaType
(
candidate
_ptr
);
}
IEnumMediaTypes_Release
(
enummt
);
...
...
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