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
310c372e
Commit
310c372e
authored
Feb 17, 2012
by
Justin Ruggles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libmp3lame: remove unneeded 'stereo' field from Mp3AudioContext
parent
a4f97be1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
libmp3lame.c
libavcodec/libmp3lame.c
+2
-5
No files found.
libavcodec/libmp3lame.c
View file @
310c372e
...
...
@@ -35,7 +35,6 @@
typedef
struct
Mp3AudioContext
{
AVClass
*
class
;
lame_global_flags
*
gfp
;
int
stereo
;
uint8_t
buffer
[
BUFFER_SIZE
];
int
buffer_index
;
int
reservoir
;
...
...
@@ -48,8 +47,6 @@ static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
if
(
avctx
->
channels
>
2
)
return
-
1
;
s
->
stereo
=
avctx
->
channels
>
1
?
1
:
0
;
if
((
s
->
gfp
=
lame_init
())
==
NULL
)
goto
err
;
lame_set_in_samplerate
(
s
->
gfp
,
avctx
->
sample_rate
);
...
...
@@ -60,7 +57,7 @@ static av_cold int MP3lame_encode_init(AVCodecContext *avctx)
}
else
{
lame_set_quality
(
s
->
gfp
,
avctx
->
compression_level
);
}
lame_set_mode
(
s
->
gfp
,
s
->
stereo
?
JOINT_STEREO
:
MONO
);
lame_set_mode
(
s
->
gfp
,
avctx
->
channels
>
1
?
JOINT_STEREO
:
MONO
);
lame_set_brate
(
s
->
gfp
,
avctx
->
bit_rate
/
1000
);
if
(
avctx
->
flags
&
CODEC_FLAG_QSCALE
)
{
lame_set_brate
(
s
->
gfp
,
0
);
...
...
@@ -153,7 +150,7 @@ static int MP3lame_encode_frame(AVCodecContext *avctx, unsigned char *frame,
/* lame 3.91 dies on '1-channel interleaved' data */
if
(
data
)
{
if
(
s
->
stereo
)
{
if
(
avctx
->
channels
>
1
)
{
lame_result
=
lame_encode_buffer_interleaved
(
s
->
gfp
,
data
,
avctx
->
frame_size
,
s
->
buffer
+
s
->
buffer_index
,
...
...
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