[FFmpeg-cvslog] mp3dec: read the initial/trailing padding from the LAME tag
Anton Khirnov
git at videolan.org
Fri Nov 18 11:52:18 EET 2016
ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Fri Jul 1 10:44:41 2016 +0200| [d60c2d5216930ef98c7d4d6837d6229b37e0dcb3] | committer: Anton Khirnov
mp3dec: read the initial/trailing padding from the LAME tag
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d60c2d5216930ef98c7d4d6837d6229b37e0dcb3
---
libavformat/mp3dec.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 0838962..e282218 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -143,7 +143,7 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
#define MIDDLE_BITS(k, m, n) LAST_BITS((k) >> (m), ((n) - (m)))
uint16_t crc;
- uint32_t v;
+ uint32_t v, delays;
char version[10];
@@ -215,7 +215,9 @@ static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
avio_r8(s->pb);
/* Encoder delays */
- avio_rb24(s->pb);
+ delays = avio_rb24(s->pb);
+ st->codecpar->initial_padding = delays >> 12;
+ st->codecpar->trailing_padding = delays & ((1 << 12) - 1);
/* Misc */
avio_r8(s->pb);
More information about the ffmpeg-cvslog
mailing list