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
203fa6b4
Commit
203fa6b4
authored
Jan 11, 2009
by
Michael Niedermayer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix indention
Originally committed as revision 16540 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
20836483
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
libmp3lame.c
libavcodec/libmp3lame.c
+12
-12
No files found.
libavcodec/libmp3lame.c
View file @
203fa6b4
...
@@ -175,10 +175,10 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
...
@@ -175,10 +175,10 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
}
}
if
(
lame_result
<
0
){
if
(
lame_result
<
0
){
if
(
lame_result
==-
1
)
{
if
(
lame_result
==-
1
)
{
/* output buffer too small */
/* output buffer too small */
av_log
(
avctx
,
AV_LOG_ERROR
,
"lame: output buffer too small (buffer index: %d, free bytes: %d)
\n
"
,
s
->
buffer_index
,
BUFFER_SIZE
-
s
->
buffer_index
);
av_log
(
avctx
,
AV_LOG_ERROR
,
"lame: output buffer too small (buffer index: %d, free bytes: %d)
\n
"
,
s
->
buffer_index
,
BUFFER_SIZE
-
s
->
buffer_index
);
}
}
return
-
1
;
return
-
1
;
}
}
...
@@ -187,20 +187,20 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
...
@@ -187,20 +187,20 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
if
(
s
->
buffer_index
<
4
)
if
(
s
->
buffer_index
<
4
)
return
0
;
return
0
;
len
=
mp3len
(
s
->
buffer
,
NULL
,
NULL
);
len
=
mp3len
(
s
->
buffer
,
NULL
,
NULL
);
//av_log(avctx, AV_LOG_DEBUG, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len, s->buffer_index);
//av_log(avctx, AV_LOG_DEBUG, "in:%d packet-len:%d index:%d\n", avctx->frame_size, len, s->buffer_index);
if
(
len
<=
s
->
buffer_index
){
if
(
len
<=
s
->
buffer_index
){
memcpy
(
frame
,
s
->
buffer
,
len
);
memcpy
(
frame
,
s
->
buffer
,
len
);
s
->
buffer_index
-=
len
;
s
->
buffer_index
-=
len
;
memmove
(
s
->
buffer
,
s
->
buffer
+
len
,
s
->
buffer_index
);
memmove
(
s
->
buffer
,
s
->
buffer
+
len
,
s
->
buffer_index
);
//FIXME fix the audio codec API, so we do not need the memcpy()
//FIXME fix the audio codec API, so we do not need the memcpy()
/*for(i=0; i<len; i++){
/*for(i=0; i<len; i++){
av_log(avctx, AV_LOG_DEBUG, "%2X ", frame[i]);
av_log(avctx, AV_LOG_DEBUG, "%2X ", frame[i]);
}*/
}*/
return
len
;
return
len
;
}
else
}
else
return
0
;
return
0
;
}
}
static
av_cold
int
MP3lame_encode_close
(
AVCodecContext
*
avctx
)
static
av_cold
int
MP3lame_encode_close
(
AVCodecContext
*
avctx
)
...
...
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