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
96c8be00
Commit
96c8be00
authored
Mar 13, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
May 01, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Use codec format in stream_props_GetMediaType.
parent
6c424b7e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
3 deletions
+7
-3
wm_reader.c
dlls/winegstreamer/wm_reader.c
+5
-1
wmvcore.c
dlls/wmvcore/tests/wmvcore.c
+2
-2
No files found.
dlls/winegstreamer/wm_reader.c
View file @
96c8be00
...
...
@@ -544,12 +544,16 @@ static HRESULT WINAPI stream_props_GetType(IWMMediaProps *iface, GUID *major_typ
static
HRESULT
WINAPI
stream_props_GetMediaType
(
IWMMediaProps
*
iface
,
WM_MEDIA_TYPE
*
mt
,
DWORD
*
size
)
{
struct
stream_config
*
config
=
impl_from_IWMMediaProps
(
iface
);
const
struct
wg_format
*
format
;
struct
wg_format
codec_format
;
const
DWORD
req_size
=
*
size
;
AM_MEDIA_TYPE
stream_mt
;
TRACE
(
"iface %p, mt %p, size %p.
\n
"
,
iface
,
mt
,
size
);
if
(
!
amt_from_wg_format
(
&
stream_mt
,
&
config
->
stream
->
format
,
true
))
wg_parser_stream_get_codec_format
(
config
->
stream
->
wg_stream
,
&
codec_format
);
format
=
(
codec_format
.
major_type
!=
WG_MAJOR_TYPE_UNKNOWN
)
?
&
codec_format
:
&
config
->
stream
->
format
;
if
(
!
amt_from_wg_format
(
&
stream_mt
,
format
,
true
))
return
E_OUTOFMEMORY
;
*
size
=
sizeof
(
stream_mt
)
+
stream_mt
.
cbFormat
;
...
...
dlls/wmvcore/tests/wmvcore.c
View file @
96c8be00
...
...
@@ -1549,7 +1549,7 @@ static void test_sync_reader_types(void)
if
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
))
test_stream_media_props
(
config
,
&
MEDIATYPE_Audio
,
&
MEDIASUBTYPE_MSAUDIO1
,
&
FORMAT_WaveFormatEx
,
TRUE
);
else
test_stream_media_props
(
config
,
&
MEDIATYPE_Video
,
&
MEDIASUBTYPE_WMV1
,
&
FORMAT_VideoInfo
,
TRU
E
);
test_stream_media_props
(
config
,
&
MEDIATYPE_Video
,
&
MEDIASUBTYPE_WMV1
,
&
FORMAT_VideoInfo
,
FALS
E
);
ref
=
IWMStreamConfig_Release
(
config
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
...
...
@@ -3429,7 +3429,7 @@ static void test_async_reader_types(void)
if
(
IsEqualGUID
(
&
majortype
,
&
MEDIATYPE_Audio
))
test_stream_media_props
(
config
,
&
MEDIATYPE_Audio
,
&
MEDIASUBTYPE_MSAUDIO1
,
&
FORMAT_WaveFormatEx
,
TRUE
);
else
test_stream_media_props
(
config
,
&
MEDIATYPE_Video
,
&
MEDIASUBTYPE_WMV1
,
&
FORMAT_VideoInfo
,
TRU
E
);
test_stream_media_props
(
config
,
&
MEDIATYPE_Video
,
&
MEDIASUBTYPE_WMV1
,
&
FORMAT_VideoInfo
,
FALS
E
);
ref
=
IWMStreamConfig_Release
(
config
);
ok
(
!
ref
,
"Got outstanding refcount %ld.
\n
"
,
ref
);
...
...
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