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
66948f89
Commit
66948f89
authored
Oct 22, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Handle NULL item in SetMediaItem().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c6c3d6f9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
1 deletion
+20
-1
player.c
dlls/mfplay/player.c
+5
-1
mfplay.c
dlls/mfplay/tests/mfplay.c
+15
-0
No files found.
dlls/mfplay/player.c
View file @
66948f89
...
...
@@ -1224,12 +1224,16 @@ static HRESULT media_item_create_topology(struct media_player *player, struct me
static
HRESULT
WINAPI
media_player_SetMediaItem
(
IMFPMediaPlayer
*
iface
,
IMFPMediaItem
*
item_iface
)
{
struct
media_player
*
player
=
impl_from_IMFPMediaPlayer
(
iface
);
struct
media_item
*
item
=
unsafe_impl_from_IMFPMediaItem
(
item_iface
)
;
struct
media_item
*
item
;
IMFTopology
*
topology
;
HRESULT
hr
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
item_iface
);
if
(
!
item_iface
)
return
E_POINTER
;
item
=
unsafe_impl_from_IMFPMediaItem
(
item_iface
);
if
(
item
->
player
!=
iface
)
return
E_INVALIDARG
;
...
...
dlls/mfplay/tests/mfplay.c
View file @
66948f89
...
...
@@ -198,8 +198,23 @@ static void test_shutdown(void)
IMFPMediaPlayer_Release
(
player
);
}
static
void
test_media_item
(
void
)
{
IMFPMediaPlayer
*
player
;
HRESULT
hr
;
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
player
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_SetMediaItem
(
player
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFPMediaPlayer_Release
(
player
);
}
START_TEST
(
mfplay
)
{
test_create_player
();
test_shutdown
();
test_media_item
();
}
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