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
4f923996
Commit
4f923996
authored
Oct 25, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 25, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Fix output argument handling in CreateMediaItemFromURL().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
848f2a4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
2 deletions
+24
-2
player.c
dlls/mfplay/player.c
+13
-2
mfplay.c
dlls/mfplay/tests/mfplay.c
+11
-0
No files found.
dlls/mfplay/player.c
View file @
4f923996
...
...
@@ -968,8 +968,6 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
IUnknown
*
object
;
HRESULT
hr
;
*
ret
=
NULL
;
if
(
FAILED
(
hr
=
create_media_item
(
&
player
->
IMFPMediaPlayer_iface
,
user_data
,
&
item
)))
return
hr
;
...
...
@@ -981,6 +979,11 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
if
(
sync
)
{
if
(
!
ret
)
return
E_POINTER
;
*
ret
=
NULL
;
if
(
SUCCEEDED
(
hr
=
IMFSourceResolver_CreateObjectFromURL
(
player
->
resolver
,
url
,
MF_RESOLUTION_MEDIASOURCE
,
player
->
propstore
,
&
obj_type
,
&
object
)))
{
...
...
@@ -1000,6 +1003,14 @@ static HRESULT media_player_create_item_from_url(struct media_player *player,
}
else
{
if
(
!
player
->
callback
)
{
WARN
(
"Asynchronous item creation is not supported without user callback.
\n
"
);
return
MF_E_INVALIDREQUEST
;
}
if
(
ret
)
*
ret
=
NULL
;
hr
=
IMFSourceResolver_BeginCreateObjectFromURL
(
player
->
resolver
,
url
,
MF_RESOLUTION_MEDIASOURCE
,
player
->
propstore
,
NULL
,
&
player
->
resolver_callback
,
(
IUnknown
*
)
&
item
->
IMFPMediaItem_iface
);
...
...
dlls/mfplay/tests/mfplay.c
View file @
4f923996
...
...
@@ -226,6 +226,7 @@ todo_wine
static
void
test_media_item
(
void
)
{
IMFPMediaPlayer
*
player
;
IMFPMediaItem
*
item
;
HRESULT
hr
;
hr
=
MFPCreateMediaPlayer
(
NULL
,
FALSE
,
0
,
NULL
,
NULL
,
&
player
);
...
...
@@ -234,6 +235,16 @@ static void test_media_item(void)
hr
=
IMFPMediaPlayer_SetMediaItem
(
player
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
/* Async mode, no callback was specified. */
hr
=
IMFPMediaPlayer_CreateMediaItemFromURL
(
player
,
L"url"
,
FALSE
,
0
,
&
item
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_CreateMediaItemFromURL
(
player
,
L"url"
,
FALSE
,
0
,
NULL
);
ok
(
hr
==
MF_E_INVALIDREQUEST
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFPMediaPlayer_CreateMediaItemFromURL
(
player
,
L"url"
,
TRUE
,
0
,
NULL
);
ok
(
hr
==
E_POINTER
,
"Unexpected hr %#x.
\n
"
,
hr
);
IMFPMediaPlayer_Release
(
player
);
}
...
...
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