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
5b3fdc26
Commit
5b3fdc26
authored
Apr 19, 2019
by
Nikolay Sivov
Committed by
Alexandre Julliard
Apr 19, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfreadwrite: Duplicate media type returned with GetNativeMediaType().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
89bfcfc6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
3 deletions
+13
-3
main.c
dlls/mfreadwrite/main.c
+8
-2
mfplat.c
dlls/mfreadwrite/tests/mfplat.c
+5
-1
No files found.
dlls/mfreadwrite/main.c
View file @
5b3fdc26
...
...
@@ -463,6 +463,7 @@ static HRESULT WINAPI src_reader_GetNativeMediaType(IMFSourceReader *iface, DWOR
struct
source_reader
*
reader
=
impl_from_IMFSourceReader
(
iface
);
IMFMediaTypeHandler
*
handler
;
IMFStreamDescriptor
*
sd
;
IMFMediaType
*
src_type
;
BOOL
selected
;
HRESULT
hr
;
...
...
@@ -489,11 +490,16 @@ static HRESULT WINAPI src_reader_GetNativeMediaType(IMFSourceReader *iface, DWOR
return
hr
;
if
(
type_index
==
MF_SOURCE_READER_CURRENT_TYPE_INDEX
)
hr
=
IMFMediaTypeHandler_GetCurrentMediaType
(
handler
,
type
);
hr
=
IMFMediaTypeHandler_GetCurrentMediaType
(
handler
,
&
src_
type
);
else
hr
=
IMFMediaTypeHandler_GetMediaTypeByIndex
(
handler
,
type_index
,
type
);
hr
=
IMFMediaTypeHandler_GetMediaTypeByIndex
(
handler
,
type_index
,
&
src_
type
);
IMFMediaTypeHandler_Release
(
handler
);
if
(
SUCCEEDED
(
hr
=
MFCreateMediaType
(
type
)))
hr
=
IMFMediaType_CopyAllItems
(
src_type
,
(
IMFAttributes
*
)
*
type
);
IMFMediaType_Release
(
src_type
);
return
hr
;
}
...
...
dlls/mfreadwrite/tests/mfplat.c
View file @
5b3fdc26
...
...
@@ -186,9 +186,9 @@ static struct async_callback *create_async_callback(void)
static
void
test_source_reader
(
void
)
{
IMFMediaType
*
mediatype
,
*
mediatype2
;
struct
async_callback
*
callback
;
IMFAttributes
*
attributes
;
IMFMediaType
*
mediatype
;
IMFSourceReader
*
reader
;
IMFMediaSource
*
source
;
IMFByteStream
*
stream
;
...
...
@@ -267,6 +267,10 @@ todo_wine
hr
=
IMFSourceReader_GetNativeMediaType
(
reader
,
MF_SOURCE_READER_FIRST_AUDIO_STREAM
,
0
,
&
mediatype
);
ok
(
hr
==
S_OK
,
"Failed to get native mediatype, hr %#x.
\n
"
,
hr
);
hr
=
IMFSourceReader_GetNativeMediaType
(
reader
,
MF_SOURCE_READER_FIRST_AUDIO_STREAM
,
0
,
&
mediatype2
);
ok
(
hr
==
S_OK
,
"Failed to get native mediatype, hr %#x.
\n
"
,
hr
);
ok
(
mediatype
!=
mediatype2
,
"Unexpected media type instance.
\n
"
);
IMFMediaType_Release
(
mediatype2
);
IMFMediaType_Release
(
mediatype
);
/* MF_SOURCE_READER_CURRENT_TYPE_INDEX is Win8+ */
...
...
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