[FFmpeg-cvslog] libmp3lame: use the correct remaining buffer size when flushing

Justin Ruggles git at videolan.org
Sun Apr 7 15:38:16 CEST 2013


ffmpeg | branch: release/0.10 | Justin Ruggles <justin.ruggles at gmail.com> | Wed Jan 16 17:52:55 2013 -0500| [5dbb3298b9c1d7beb41c7d3ab19f86d6e027e43d] | committer: Reinhard Tartler

libmp3lame: use the correct remaining buffer size when flushing

CC:libav-stable at libav.org
(cherry picked from commit e984f47873258b600fd88423f40e3cdaad179190)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>
(cherry picked from commit b77d9cbbd5050eda75030c8926241af3dbe1a8df)

Signed-off-by: Reinhard Tartler <siretart at tauware.de>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5dbb3298b9c1d7beb41c7d3ab19f86d6e027e43d
---

 libavcodec/libmp3lame.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index f3c4528..3e8d92a 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -169,7 +169,7 @@ static int MP3lame_encode_frame(AVCodecContext *avctx, unsigned char *frame,
         }
     } else {
         lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index,
-                                        BUFFER_SIZE - s->buffer_index);
+                                        s->buffer_size - s->buffer_index);
     }
 
     if (lame_result < 0) {



More information about the ffmpeg-cvslog mailing list