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
e36a6166
Commit
e36a6166
authored
Apr 06, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplay: Create presentation descriptor for the item.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b87f938c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
1 deletion
+21
-1
player.c
dlls/mfplay/player.c
+21
-1
No files found.
dlls/mfplay/player.c
View file @
e36a6166
...
...
@@ -50,6 +50,7 @@ struct media_item
LONG
refcount
;
IMFPMediaPlayer
*
player
;
IMFMediaSource
*
source
;
IMFPresentationDescriptor
*
pd
;
DWORD_PTR
user_data
;
};
...
...
@@ -124,6 +125,8 @@ static ULONG WINAPI media_item_Release(IMFPMediaItem *iface)
IMFPMediaPlayer_Release
(
item
->
player
);
if
(
item
->
source
)
IMFMediaSource_Release
(
item
->
source
);
if
(
item
->
pd
)
IMFPresentationDescriptor_Release
(
item
->
pd
);
heap_free
(
item
);
}
...
...
@@ -328,7 +331,24 @@ static HRESULT create_media_item(IMFPMediaPlayer *player, DWORD_PTR user_data, s
static
HRESULT
media_item_set_source
(
struct
media_item
*
item
,
IUnknown
*
object
)
{
return
IUnknown_QueryInterface
(
object
,
&
IID_IMFMediaSource
,
(
void
**
)
&
item
->
source
);
IMFPresentationDescriptor
*
pd
;
IMFMediaSource
*
source
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
IUnknown_QueryInterface
(
object
,
&
IID_IMFMediaSource
,
(
void
**
)
&
source
)))
return
hr
;
if
(
FAILED
(
hr
=
IMFMediaSource_CreatePresentationDescriptor
(
source
,
&
pd
)))
{
WARN
(
"Failed to get presentation descriptor, hr %#x.
\n
"
,
hr
);
IMFMediaSource_Release
(
source
);
return
hr
;
}
item
->
source
=
source
;
item
->
pd
=
pd
;
return
hr
;
}
static
HRESULT
WINAPI
media_player_QueryInterface
(
IMFPMediaPlayer
*
iface
,
REFIID
riid
,
void
**
obj
)
...
...
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