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
3e6eaaa2
Commit
3e6eaaa2
authored
Mar 03, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 04, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Allow AMMSF_ADDDEFAULTRENDERER only with MSPID_PrimaryAudio.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c6d436f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
15 deletions
+13
-15
multimedia.c
dlls/amstream/multimedia.c
+10
-15
amstream.c
dlls/amstream/tests/amstream.c
+3
-0
No files found.
dlls/amstream/multimedia.c
View file @
3e6eaaa2
...
...
@@ -305,26 +305,21 @@ static HRESULT WINAPI multimedia_stream_AddMediaStream(IAMMultiMediaStream *ifac
if
(
dwFlags
&
AMMSF_ADDDEFAULTRENDERER
)
{
if
(
IsEqualGUID
(
PurposeId
,
&
MSPID_PrimaryVideo
))
IBaseFilter
*
dsound_render
;
if
(
!
IsEqualGUID
(
PurposeId
,
&
MSPID_PrimaryAudio
))
{
/* Default renderer not supported by video stream */
WARN
(
"AMMSF_ADDDEFAULTRENDERER requested with id %s, returning MS_E_PURPOSEID.
\n
"
,
debugstr_guid
(
PurposeId
));
return
MS_E_PURPOSEID
;
}
else
{
IBaseFilter
*
dsoundrender_filter
;
/* Create the default renderer for audio */
hr
=
CoCreateInstance
(
&
CLSID_DSoundRender
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
LPVOID
*
)
&
dsoundrender_filter
);
if
(
SUCCEEDED
(
hr
))
{
hr
=
IGraphBuilder_AddFilter
(
This
->
pFilterGraph
,
dsoundrender_filter
,
NULL
);
IBaseFilter_Release
(
dsoundrender_filter
);
}
/* No media stream created when the default renderer is used */
return
hr
;
if
(
SUCCEEDED
(
hr
=
CoCreateInstance
(
&
CLSID_DSoundRender
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
dsound_render
)))
{
hr
=
IGraphBuilder_AddFilter
(
This
->
pFilterGraph
,
dsound_render
,
NULL
);
IBaseFilter_Release
(
dsound_render
);
}
return
hr
;
}
if
(
IsEqualGUID
(
PurposeId
,
&
MSPID_PrimaryVideo
))
...
...
dlls/amstream/tests/amstream.c
View file @
3e6eaaa2
...
...
@@ -841,6 +841,9 @@ static void test_add_stream(void)
}
hr
=
IAMMultiMediaStream_AddMediaStream
(
mmstream
,
NULL
,
&
test_mspid
,
AMMSF_ADDDEFAULTRENDERER
,
NULL
);
ok
(
hr
==
MS_E_PURPOSEID
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_AddMediaStream
(
mmstream
,
NULL
,
&
test_mspid
,
AMMSF_ADDDEFAULTRENDERER
,
&
audio_stream
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
...
...
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