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
902133b0
Commit
902133b0
authored
Sep 18, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Correct output available types attrs in AAC decoder for channel count > 2.
parent
5b0172e1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
4 deletions
+21
-4
transform.c
dlls/mf/tests/transform.c
+1
-3
aac_decoder.c
dlls/winegstreamer/aac_decoder.c
+20
-1
No files found.
dlls/mf/tests/transform.c
View file @
902133b0
...
...
@@ -2622,7 +2622,7 @@ static void test_aac_decoder_channels(const struct attribute_desc *input_type_de
hr
=
IMFAttributes_GetUINT32
(
attrs
,
&
MF_MT_AUDIO_PREFER_WAVEFORMATEX
,
&
value
);
if
(
many_channels
&&
i
<
ARRAY_SIZE
(
expect_available_outputs
))
{
todo_wine
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"got %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_ATTRIBUTENOTFOUND
,
"got %#lx.
\n
"
,
hr
);
}
else
{
...
...
@@ -2638,11 +2638,9 @@ static void test_aac_decoder_channels(const struct attribute_desc *input_type_de
}
else
{
todo_wine
{
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
ok
(
value
==
expected_mask
[
expected_chans
],
"got %#x, expected %#x.
\n
"
,
value
,
expected_mask
[
expected_chans
]);
}
}
ret
=
IMFMediaType_Release
(
type
);
...
...
dlls/winegstreamer/aac_decoder.c
View file @
902133b0
...
...
@@ -24,6 +24,8 @@
#include "mfobjects.h"
#include "mftransform.h"
#include "wmcodecdsp.h"
#include "ks.h"
#include "ksmedia.h"
#include "wine/debug.h"
...
...
@@ -48,6 +50,17 @@ static const GUID *const aac_decoder_output_types[] =
&
MFAudioFormat_Float
,
};
static
const
UINT32
default_channel_mask
[
7
]
=
{
0
,
0
,
0
,
SPEAKER_FRONT_LEFT
|
SPEAKER_FRONT_RIGHT
|
SPEAKER_BACK_CENTER
,
KSAUDIO_SPEAKER_QUAD
,
KSAUDIO_SPEAKER_QUAD
|
SPEAKER_FRONT_CENTER
,
KSAUDIO_SPEAKER_5POINT1
,
};
struct
aac_decoder
{
IMFTransform
IMFTransform_iface
;
...
...
@@ -295,6 +308,9 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
||
!
channel_count
)
channel_count
=
2
;
if
(
channel_count
>=
ARRAY_SIZE
(
default_channel_mask
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
index
>=
ARRAY_SIZE
(
aac_decoder_output_types
))
return
MF_E_NO_MORE_TYPES
;
index
=
ARRAY_SIZE
(
aac_decoder_output_types
)
-
index
-
1
;
...
...
@@ -340,7 +356,10 @@ static HRESULT WINAPI transform_GetOutputAvailableType(IMFTransform *iface, DWOR
goto
done
;
if
(
FAILED
(
hr
=
IMFMediaType_SetUINT32
(
media_type
,
&
MF_MT_FIXED_SIZE_SAMPLES
,
1
)))
goto
done
;
if
(
FAILED
(
hr
=
IMFMediaType_SetUINT32
(
media_type
,
&
MF_MT_AUDIO_PREFER_WAVEFORMATEX
,
1
)))
if
(
channel_count
<
3
&&
FAILED
(
hr
=
IMFMediaType_SetUINT32
(
media_type
,
&
MF_MT_AUDIO_PREFER_WAVEFORMATEX
,
1
)))
goto
done
;
if
(
channel_count
>=
3
&&
FAILED
(
hr
=
IMFMediaType_SetUINT32
(
media_type
,
&
MF_MT_AUDIO_CHANNEL_MASK
,
default_channel_mask
[
channel_count
])))
goto
done
;
done:
...
...
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