Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gabriel Ivăncescu
wine
Commits
a646aa44
Commit
a646aa44
authored
2 years ago
by
Paul Gofman
Committed by
Alexandre Julliard
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
winegstreamer: Fix getting codec data for raw aac.
parent
98fb7882
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/winegstreamer/mfplat.c
+10
-4
10 additions, 4 deletions
dlls/winegstreamer/mfplat.c
with
10 additions
and
4 deletions
dlls/winegstreamer/mfplat.c
+
10
−
4
View file @
a646aa44
...
...
@@ -624,7 +624,7 @@ static void mf_media_type_to_wg_format_audio(IMFMediaType *type, const GUID *sub
FIXME
(
"Unrecognized audio subtype %s, depth %u.
\n
"
,
debugstr_guid
(
subtype
),
depth
);
}
static
void
mf_media_type_to_wg_format_audio_mpeg4
(
IMFMediaType
*
type
,
struct
wg_format
*
format
)
static
void
mf_media_type_to_wg_format_audio_mpeg4
(
IMFMediaType
*
type
,
const
GUID
*
subtype
,
struct
wg_format
*
format
)
{
/* Audio specific config is stored at after HEAACWAVEINFO in MF_MT_USER_DATA
* https://docs.microsoft.com/en-us/windows/win32/api/mmreg/ns-mmreg-heaacwaveformat
...
...
@@ -646,6 +646,7 @@ static void mf_media_type_to_wg_format_audio_mpeg4(IMFMediaType *type, struct wg
BYTE
buffer
[
64
];
HEAACWAVEFORMAT
*
user_data
=
(
HEAACWAVEFORMAT
*
)
buffer
;
UINT32
codec_data_size
;
BOOL
raw_aac
;
if
(
FAILED
(
IMFMediaType_GetBlob
(
type
,
&
MF_MT_USER_DATA
,
buffer
,
sizeof
(
buffer
),
&
codec_data_size
)))
{
...
...
@@ -653,12 +654,18 @@ static void mf_media_type_to_wg_format_audio_mpeg4(IMFMediaType *type, struct wg
return
;
}
codec_data_size
-=
min
(
codec_data_size
,
offsetof
(
HEAACWAVEFORMAT
,
pbAudioSpecificConfig
));
raw_aac
=
IsEqualGUID
(
subtype
,
&
MFAudioFormat_RAW_AAC
);
if
(
!
raw_aac
)
codec_data_size
-=
min
(
codec_data_size
,
offsetof
(
HEAACWAVEFORMAT
,
pbAudioSpecificConfig
));
if
(
codec_data_size
>
sizeof
(
format
->
u
.
audio_mpeg4
.
codec_data
))
{
FIXME
(
"Codec data needs %u bytes.
\n
"
,
codec_data_size
);
return
;
}
if
(
raw_aac
)
memcpy
(
format
->
u
.
audio_mpeg4
.
codec_data
,
buffer
,
codec_data_size
);
else
memcpy
(
format
->
u
.
audio_mpeg4
.
codec_data
,
user_data
->
pbAudioSpecificConfig
,
codec_data_size
);
format
->
major_type
=
WG_MAJOR_TYPE_AUDIO_MPEG4
;
...
...
@@ -666,7 +673,6 @@ static void mf_media_type_to_wg_format_audio_mpeg4(IMFMediaType *type, struct wg
format
->
u
.
audio_mpeg4
.
payload_type
=
-
1
;
format
->
u
.
audio_mpeg4
.
codec_data_len
=
codec_data_size
;
memcpy
(
format
->
u
.
audio_mpeg4
.
codec_data
,
user_data
->
pbAudioSpecificConfig
,
codec_data_size
);
}
static
enum
wg_video_format
mf_video_format_to_wg
(
const
GUID
*
subtype
)
...
...
@@ -864,7 +870,7 @@ void mf_media_type_to_wg_format(IMFMediaType *type, struct wg_format *format)
IsEqualGUID
(
&
subtype
,
&
MFAudioFormat_WMAudio_Lossless
))
mf_media_type_to_wg_format_audio_wma
(
type
,
&
subtype
,
format
);
else
if
(
IsEqualGUID
(
&
subtype
,
&
MFAudioFormat_AAC
)
||
IsEqualGUID
(
&
subtype
,
&
MFAudioFormat_RAW_AAC
))
mf_media_type_to_wg_format_audio_mpeg4
(
type
,
format
);
mf_media_type_to_wg_format_audio_mpeg4
(
type
,
&
subtype
,
format
);
else
mf_media_type_to_wg_format_audio
(
type
,
&
subtype
,
format
);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment