diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-07-01 10:49:33 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-07-15 15:30:30 +0200 |
commit | 46278ec90ac5ad1dab5e85991f176afe49003fee (patch) | |
tree | d69d0b9edd4165c73409700bdea21653f7ad8285 /libavformat/mp3enc.c | |
parent | d60c2d5216930ef98c7d4d6837d6229b37e0dcb3 (diff) | |
download | ffmpeg-46278ec90ac5ad1dab5e85991f176afe49003fee.tar.gz |
mp3enc: write trailing padding
Diffstat (limited to 'libavformat/mp3enc.c')
-rw-r--r-- | libavformat/mp3enc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c index a62c7f6c8c..1e2ff1aa94 100644 --- a/libavformat/mp3enc.c +++ b/libavformat/mp3enc.c @@ -245,11 +245,12 @@ static void mp3_write_xing(AVFormatContext *s) avio_w8(dyn_ctx, 0); // unknown abr/minimal bitrate // encoder delay - if (par->initial_padding >= 1 << 12) { - av_log(s, AV_LOG_WARNING, "Too many samples of initial padding.\n"); + if (par->initial_padding >= 1 << 12 || + par->trailing_padding >= 1 << 12) { + av_log(s, AV_LOG_WARNING, "Too many samples of padding.\n"); avio_wb24(dyn_ctx, 0); } else { - avio_wb24(dyn_ctx, par->initial_padding << 12); + avio_wb24(dyn_ctx, par->initial_padding << 12 | par->trailing_padding); } avio_w8(dyn_ctx, 0); // misc |