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
e6694659
Commit
e6694659
authored
May 07, 2012
by
Anton Khirnov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libmp3lame: set supported channel layouts.
parent
6eeb9a04
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
5 deletions
+3
-5
libmp3lame.c
libavcodec/libmp3lame.c
+3
-5
No files found.
libavcodec/libmp3lame.c
View file @
e6694659
...
...
@@ -26,6 +26,7 @@
#include <lame/lame.h>
#include "libavutil/audioconvert.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/log.h"
#include "libavutil/opt.h"
...
...
@@ -76,11 +77,6 @@ static av_cold int mp3lame_encode_init(AVCodecContext *avctx)
if
((
s
->
gfp
=
lame_init
())
==
NULL
)
return
AVERROR
(
ENOMEM
);
/* channels */
if
(
avctx
->
channels
>
2
)
{
ret
=
AVERROR
(
EINVAL
);
goto
error
;
}
lame_set_num_channels
(
s
->
gfp
,
avctx
->
channels
);
lame_set_mode
(
s
->
gfp
,
avctx
->
channels
>
1
?
JOINT_STEREO
:
MONO
);
...
...
@@ -308,6 +304,8 @@ AVCodec ff_libmp3lame_encoder = {
AV_SAMPLE_FMT_S16
,
AV_SAMPLE_FMT_NONE
},
.
supported_samplerates
=
libmp3lame_sample_rates
,
.
channel_layouts
=
(
const
uint64_t
[])
{
AV_CH_LAYOUT_MONO
,
AV_CH_LAYOUT_STEREO
},
.
long_name
=
NULL_IF_CONFIG_SMALL
(
"libmp3lame MP3 (MPEG audio layer 3)"
),
.
priv_class
=
&
libmp3lame_class
,
.
defaults
=
libmp3lame_defaults
,
...
...
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