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
95ab5110
Commit
95ab5110
authored
Mar 12, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Mar 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Use source resolver when creating reader from bytestream.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
61f76829
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
Makefile.in
dlls/mfreadwrite/Makefile.in
+1
-1
main.c
dlls/mfreadwrite/main.c
+16
-2
No files found.
dlls/mfreadwrite/Makefile.in
View file @
95ab5110
MODULE
=
mfreadwrite.dll
IMPORTLIB
=
mfreadwrite
IMPORTS
=
mfuuid uuid
IMPORTS
=
mfuuid uuid
mfplat
C_SRCS
=
\
main.c
...
...
dlls/mfreadwrite/main.c
View file @
95ab5110
...
...
@@ -254,9 +254,23 @@ static HRESULT create_source_reader_from_source(IMFMediaSource *source, IMFAttri
static
HRESULT
create_source_reader_from_stream
(
IMFByteStream
*
stream
,
IMFAttributes
*
attributes
,
REFIID
riid
,
void
**
out
)
{
/* FIXME: resolve bytestream to media source */
IMFSourceResolver
*
resolver
;
MF_OBJECT_TYPE
obj_type
;
IMFMediaSource
*
source
;
HRESULT
hr
;
if
(
FAILED
(
hr
=
MFCreateSourceResolver
(
&
resolver
)))
return
hr
;
return
create_source_reader_from_source
(
NULL
,
attributes
,
riid
,
out
);
hr
=
IMFSourceResolver_CreateObjectFromByteStream
(
resolver
,
stream
,
NULL
,
MF_RESOLUTION_MEDIASOURCE
,
NULL
,
&
obj_type
,
(
IUnknown
**
)
&
source
);
IMFSourceResolver_Release
(
resolver
);
if
(
FAILED
(
hr
))
return
hr
;
hr
=
create_source_reader_from_source
(
source
,
attributes
,
riid
,
out
);
IMFMediaSource_Release
(
source
);
return
hr
;
}
static
HRESULT
WINAPI
sink_writer_QueryInterface
(
IMFSinkWriter
*
iface
,
REFIID
riid
,
void
**
out
)
...
...
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