[FFmpeg-devel] [PATCH 2/4] lavc/libmp3lame: set trailing_padding after flushing encoder
Jon Toohill
jtoohill at google.com
Mon Sep 26 20:13:37 EEST 2016
---
libavcodec/libmp3lame.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/libavcodec/libmp3lame.c b/libavcodec/libmp3lame.c
index 5642264..1566921 100644
--- a/libavcodec/libmp3lame.c
+++ b/libavcodec/libmp3lame.c
@@ -218,6 +218,7 @@ static int mp3lame_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
} else {
lame_result = lame_encode_flush(s->gfp, s->buffer + s->buffer_index,
s->buffer_size - s->buffer_index);
+ avctx->trailing_padding = FFMAX(lame_get_encoder_padding(s->gfp) - 528 - 1, 0);
}
if (lame_result < 0) {
if (lame_result == -1) {
--
2.8.0.rc3.226.g39d4020
More information about the ffmpeg-devel
mailing list