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
1939bfff
Commit
1939bfff
authored
Nov 16, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Jan 22, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Support AAC format attributes in MFInitMediaTypeFromWaveFormatEx.
parent
96346d24
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
mediatype.c
dlls/mfplat/mediatype.c
+9
-0
mfplat.c
dlls/mfplat/tests/mfplat.c
+0
-5
No files found.
dlls/mfplat/mediatype.c
View file @
1939bfff
...
...
@@ -3124,6 +3124,15 @@ HRESULT WINAPI MFInitMediaTypeFromWaveFormatEx(IMFMediaType *mediatype, const WA
mediatype_set_uint32
(
mediatype
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
1
,
&
hr
);
}
if
(
IsEqualGUID
(
&
subtype
,
&
MFAudioFormat_AAC
))
{
HEAACWAVEINFO
*
info
=
CONTAINING_RECORD
(
format
,
HEAACWAVEINFO
,
wfx
);
if
(
format
->
cbSize
<
sizeof
(
HEAACWAVEINFO
)
-
sizeof
(
WAVEFORMATEX
))
return
E_INVALIDARG
;
mediatype_set_uint32
(
mediatype
,
&
MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION
,
info
->
wAudioProfileLevelIndication
,
&
hr
);
mediatype_set_uint32
(
mediatype
,
&
MF_MT_AAC_PAYLOAD_TYPE
,
info
->
wPayloadType
,
&
hr
);
}
if
(
format
->
cbSize
&&
format
->
wFormatTag
!=
WAVE_FORMAT_EXTENSIBLE
)
mediatype_set_blob
(
mediatype
,
&
MF_MT_USER_DATA
,
(
const
UINT8
*
)(
format
+
1
),
format
->
cbSize
,
&
hr
);
...
...
dlls/mfplat/tests/mfplat.c
View file @
1939bfff
...
...
@@ -7059,7 +7059,6 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void)
/* test with invalid format size */
aacformat
.
wfInfo
.
wfx
.
cbSize
=
sizeof
(
aacformat
)
-
2
-
sizeof
(
WAVEFORMATEX
);
hr
=
MFInitMediaTypeFromWaveFormatEx
(
mediatype
,
(
WAVEFORMATEX
*
)
&
aacformat
,
sizeof
(
aacformat
)
-
2
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#lx.
\n
"
,
hr
);
aacformat
.
wfInfo
.
wfx
.
cbSize
=
sizeof
(
aacformat
)
-
sizeof
(
WAVEFORMATEX
);
...
...
@@ -7070,15 +7069,11 @@ static void test_MFInitMediaTypeFromWaveFormatEx(void)
value
=
0xdeadbeef
;
hr
=
IMFMediaType_GetUINT32
(
mediatype
,
&
MF_MT_AAC_AUDIO_PROFILE_LEVEL_INDICATION
,
&
value
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get attribute, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value
==
aacformat
.
wfInfo
.
wAudioProfileLevelIndication
,
"Unexpected AAC_AUDIO_PROFILE_LEVEL_INDICATION %u.
\n
"
,
value
);
value
=
0xdeadbeef
;
hr
=
IMFMediaType_GetUINT32
(
mediatype
,
&
MF_MT_AAC_PAYLOAD_TYPE
,
&
value
);
todo_wine
ok
(
hr
==
S_OK
,
"Failed to get attribute, hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
value
==
aacformat
.
wfInfo
.
wPayloadType
,
"Unexpected AAC_PAYLOAD_TYPE %u.
\n
"
,
value
);
hr
=
IMFMediaType_GetBlob
(
mediatype
,
&
MF_MT_USER_DATA
,
buff
,
sizeof
(
buff
),
&
size
);
...
...
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