summaryrefslogtreecommitdiff
path: root/libavcodec/libmp3lame.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libmp3lame.c')
-rw-r--r--libavcodec/libmp3lame.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index bccff00b0e..af783a0651 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -174,10 +174,12 @@ static int MP3lame_encode_frame(AVCodecContext *avctx,
);
}
+ if(lame_result < 0){
if(lame_result==-1) {
/* 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);
- return 0;
+ }
+ return -1;
}
s->buffer_index += lame_result;