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
fa62cde3
Commit
fa62cde3
authored
Mar 04, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Mar 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Forbid changing the graph in IAMMultiMediaStream::Initialize().
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
20004d15
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
0 deletions
+15
-0
multimedia.c
dlls/amstream/multimedia.c
+6
-0
amstream.c
dlls/amstream/tests/amstream.c
+9
-0
No files found.
dlls/amstream/multimedia.c
View file @
fa62cde3
...
...
@@ -244,6 +244,12 @@ static HRESULT WINAPI multimedia_stream_Initialize(IAMMultiMediaStream *iface,
TRACE
(
"mmstream %p, type %u, flags %#x, graph %p.
\n
"
,
mmstream
,
type
,
flags
,
graph
);
if
(
graph
&&
mmstream
->
graph
)
{
WARN
(
"Graph already initialized, returning E_INVALIDARG.
\n
"
);
return
E_INVALIDARG
;
}
if
(
graph
&&
FAILED
(
hr
=
create_graph
(
mmstream
,
graph
)))
return
hr
;
...
...
dlls/amstream/tests/amstream.c
View file @
fa62cde3
...
...
@@ -1646,6 +1646,15 @@ static void test_initialize(void)
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
ok
(
!
got_add_filter
,
"Got %d calls to IGraphBuilder::AddFilter().
\n
"
,
got_add_filter
);
hr
=
IAMMultiMediaStream_Initialize
(
mmstream
,
STREAMTYPE_READ
,
0
,
(
IGraphBuilder
*
)
&
graph
);
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_Initialize
(
mmstream
,
STREAMTYPE_READ
,
0
,
NULL
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_Initialize
(
mmstream
,
STREAMTYPE_WRITE
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IAMMultiMediaStream_Initialize
(
mmstream
,
STREAMTYPE_TRANSFORM
,
0
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Got hr %#x.
\n
"
,
hr
);
IMediaStreamFilter_Release
(
filter
);
ref
=
IAMMultiMediaStream_Release
(
mmstream
);
ok
(
!
ref
,
"Got outstanding refcount %d.
\n
"
,
ref
);
...
...
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