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
e56425d1
Commit
e56425d1
authored
Oct 24, 2014
by
Benoit Fouet
Committed by
Michael Niedermayer
Oct 24, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avcodec/aacdec: warn user when remapping streams.
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
279b2a4d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
aac.h
libavcodec/aac.h
+1
-0
aacdec.c
libavcodec/aacdec.c
+12
-0
No files found.
libavcodec/aac.h
View file @
e56425d1
...
...
@@ -274,6 +274,7 @@ struct AACContext {
ChannelElement
*
che
[
4
][
MAX_ELEM_ID
];
ChannelElement
*
tag_che_map
[
4
][
MAX_ELEM_ID
];
int
tags_mapped
;
int
warned_remapping_once
;
/** @} */
/**
...
...
libavcodec/aacdec.c
View file @
e56425d1
...
...
@@ -621,6 +621,12 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
* If we seem to have encountered such a stream, transfer
* the LFE[0] element to the SCE[1]'s mapping */
if
(
ac
->
tags_mapped
==
tags_per_config
[
ac
->
oc
[
1
].
m4ac
.
chan_config
]
-
1
&&
(
type
==
TYPE_LFE
||
type
==
TYPE_SCE
))
{
if
(
!
ac
->
warned_remapping_once
&&
(
type
!=
TYPE_LFE
||
elem_id
!=
0
))
{
av_log
(
ac
->
avctx
,
AV_LOG_WARNING
,
"This stream seems to incorrectly report its last channel as %s[%d], mapping to LFE[0]
\n
"
,
type
==
TYPE_SCE
?
"SCE"
:
"LFE"
,
elem_id
);
ac
->
warned_remapping_once
++
;
}
ac
->
tags_mapped
++
;
return
ac
->
tag_che_map
[
type
][
elem_id
]
=
ac
->
che
[
TYPE_LFE
][
0
];
}
...
...
@@ -637,6 +643,12 @@ static ChannelElement *get_che(AACContext *ac, int type, int elem_id)
* If we seem to have encountered such a stream, transfer
* the SCE[1] element to the LFE[0]'s mapping */
if
(
ac
->
tags_mapped
==
tags_per_config
[
ac
->
oc
[
1
].
m4ac
.
chan_config
]
-
1
&&
(
type
==
TYPE_LFE
||
type
==
TYPE_SCE
))
{
if
(
!
ac
->
warned_remapping_once
&&
(
type
!=
TYPE_SCE
||
elem_id
!=
1
))
{
av_log
(
ac
->
avctx
,
AV_LOG_WARNING
,
"This stream seems to incorrectly report its last channel as %s[%d], mapping to SCE[1]
\n
"
,
type
==
TYPE_SCE
?
"SCE"
:
"LFE"
,
elem_id
);
ac
->
warned_remapping_once
++
;
}
ac
->
tags_mapped
++
;
return
ac
->
tag_che_map
[
type
][
elem_id
]
=
ac
->
che
[
TYPE_SCE
][
1
];
}
...
...
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