Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
7988dd1b
Commit
7988dd1b
authored
Jan 25, 2012
by
Carl Eugen Hoyos
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix multi-channel encoding with libfaac.
parent
749e5dc1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
libfaac.c
libavcodec/libfaac.c
+10
-0
No files found.
libavcodec/libfaac.c
View file @
7988dd1b
...
@@ -31,6 +31,13 @@ typedef struct FaacAudioContext {
...
@@ -31,6 +31,13 @@ typedef struct FaacAudioContext {
faacEncHandle
faac_handle
;
faacEncHandle
faac_handle
;
}
FaacAudioContext
;
}
FaacAudioContext
;
static
const
int
channel_maps
[][
6
]
=
{
{
2
,
0
,
1
},
//< C L R
{
2
,
0
,
1
,
3
},
//< C L R Cs
{
2
,
0
,
1
,
3
,
4
},
//< C L R Ls Rs
{
2
,
0
,
1
,
4
,
5
,
3
},
//< C L R Ls Rs LFE
};
static
av_cold
int
Faac_encode_init
(
AVCodecContext
*
avctx
)
static
av_cold
int
Faac_encode_init
(
AVCodecContext
*
avctx
)
{
{
FaacAudioContext
*
s
=
avctx
->
priv_data
;
FaacAudioContext
*
s
=
avctx
->
priv_data
;
...
@@ -86,6 +93,9 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
...
@@ -86,6 +93,9 @@ static av_cold int Faac_encode_init(AVCodecContext *avctx)
}
}
faac_cfg
->
outputFormat
=
1
;
faac_cfg
->
outputFormat
=
1
;
faac_cfg
->
inputFormat
=
FAAC_INPUT_16BIT
;
faac_cfg
->
inputFormat
=
FAAC_INPUT_16BIT
;
if
(
avctx
->
channels
>
2
)
memcpy
(
faac_cfg
->
channel_map
,
channel_maps
[
avctx
->
channels
-
3
],
avctx
->
channels
*
sizeof
(
int
));
avctx
->
frame_size
=
samples_input
/
avctx
->
channels
;
avctx
->
frame_size
=
samples_input
/
avctx
->
channels
;
...
...
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