Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
4d9b9c5e
Commit
4d9b9c5e
authored
Mar 27, 2020
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lavc/aacdec_template: Only warn once about unusual 7.1 encoding.
parent
84abd101
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
aac.h
libavcodec/aac.h
+1
-1
aacdec_template.c
libavcodec/aacdec_template.c
+10
-10
No files found.
libavcodec/aac.h
View file @
4d9b9c5e
...
...
@@ -356,7 +356,7 @@ struct AACContext {
OutputConfiguration
oc
[
2
];
int
warned_num_aac_frames
;
int
warned_960_sbr
;
unsigned
warned_71_wide
;
int
warned_gain_control
;
/* aacdec functions pointers */
...
...
libavcodec/aacdec_template.c
View file @
4d9b9c5e
...
...
@@ -520,14 +520,14 @@ static void flush(AVCodecContext *avctx)
*
* @return Returns error status. 0 - OK, !0 - error
*/
static
int
set_default_channel_config
(
A
VCodecContext
*
avctx
,
static
int
set_default_channel_config
(
A
ACContext
*
ac
,
uint8_t
(
*
layout_map
)[
3
],
int
*
tags
,
int
channel_config
)
{
if
(
channel_config
<
1
||
(
channel_config
>
7
&&
channel_config
<
11
)
||
channel_config
>
12
)
{
av_log
(
avctx
,
AV_LOG_ERROR
,
av_log
(
a
c
->
a
vctx
,
AV_LOG_ERROR
,
"invalid default channel configuration (%d)
\n
"
,
channel_config
);
return
AVERROR_INVALIDDATA
;
...
...
@@ -547,8 +547,8 @@ static int set_default_channel_config(AVCodecContext *avctx,
* As actual intended 7.1(wide) streams are very rare, default to assuming a
* 7.1 layout was intended.
*/
if
(
channel_config
==
7
&&
a
vctx
->
strict_std_compliance
<
FF_COMPLIANCE_STRICT
)
{
av_log
(
avctx
,
AV_LOG_INFO
,
"Assuming an incorrectly encoded 7.1 channel layout"
if
(
channel_config
==
7
&&
a
c
->
avctx
->
strict_std_compliance
<
FF_COMPLIANCE_STRICT
&&
!
ac
->
warned_71_wide
++
)
{
av_log
(
a
c
->
a
vctx
,
AV_LOG_INFO
,
"Assuming an incorrectly encoded 7.1 channel layout"
" instead of a spec-compliant 7.1(wide) layout, use -strict %d to decode"
" according to the specification instead.
\n
"
,
FF_COMPLIANCE_STRICT
);
layout_map
[
2
][
2
]
=
AAC_CHANNEL_SIDE
;
...
...
@@ -573,7 +573,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
av_log
(
ac
->
avctx
,
AV_LOG_DEBUG
,
"mono with CPE
\n
"
);
if
(
set_default_channel_config
(
ac
->
avctx
,
layout_map
,
if
(
set_default_channel_config
(
ac
,
layout_map
,
&
layout_map_tags
,
2
)
<
0
)
return
NULL
;
if
(
output_configure
(
ac
,
layout_map
,
layout_map_tags
,
...
...
@@ -592,7 +592,7 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
av_log
(
ac
->
avctx
,
AV_LOG_DEBUG
,
"stereo with SCE
\n
"
);
if
(
set_default_channel_config
(
ac
->
avctx
,
layout_map
,
if
(
set_default_channel_config
(
ac
,
layout_map
,
&
layout_map_tags
,
1
)
<
0
)
return
NULL
;
if
(
output_configure
(
ac
,
layout_map
,
layout_map_tags
,
...
...
@@ -841,7 +841,7 @@ static int decode_ga_specific_config(AACContext *ac, AVCodecContext *avctx,
if
(
tags
<
0
)
return
tags
;
}
else
{
if
((
ret
=
set_default_channel_config
(
a
vctx
,
layout_map
,
if
((
ret
=
set_default_channel_config
(
a
c
,
layout_map
,
&
tags
,
channel_config
)))
return
ret
;
}
...
...
@@ -937,7 +937,7 @@ static int decode_eld_specific_config(AACContext *ac, AVCodecContext *avctx,
skip_bits_long
(
gb
,
8
*
len
);
}
if
((
ret
=
set_default_channel_config
(
a
vctx
,
layout_map
,
if
((
ret
=
set_default_channel_config
(
a
c
,
layout_map
,
&
tags
,
channel_config
)))
return
ret
;
...
...
@@ -1200,7 +1200,7 @@ static av_cold int aac_decode_init(AVCodecContext *avctx)
ac
->
oc
[
1
].
m4ac
.
chan_config
=
i
;
if
(
ac
->
oc
[
1
].
m4ac
.
chan_config
)
{
int
ret
=
set_default_channel_config
(
a
vctx
,
layout_map
,
int
ret
=
set_default_channel_config
(
a
c
,
layout_map
,
&
layout_map_tags
,
ac
->
oc
[
1
].
m4ac
.
chan_config
);
if
(
!
ret
)
output_configure
(
ac
,
layout_map
,
layout_map_tags
,
...
...
@@ -3002,7 +3002,7 @@ static int parse_adts_frame_header(AACContext *ac, GetBitContext *gb)
push_output_configuration
(
ac
);
if
(
hdr_info
.
chan_config
)
{
ac
->
oc
[
1
].
m4ac
.
chan_config
=
hdr_info
.
chan_config
;
if
((
ret
=
set_default_channel_config
(
ac
->
avctx
,
if
((
ret
=
set_default_channel_config
(
ac
,
layout_map
,
&
layout_map_tags
,
hdr_info
.
chan_config
))
<
0
)
...
...
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