diff options
author | Anton Khirnov <anton@khirnov.net> | 2016-07-01 10:44:41 +0200 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2016-07-15 15:30:22 +0200 |
commit | d60c2d5216930ef98c7d4d6837d6229b37e0dcb3 (patch) | |
tree | 164eda8d855d68d336b9bc3aa6aa370a1ee6e982 /libavformat | |
parent | 7a76371437f9562c3414f985523f883489e3936a (diff) | |
download | ffmpeg-streaming-d60c2d5216930ef98c7d4d6837d6229b37e0dcb3.zip ffmpeg-streaming-d60c2d5216930ef98c7d4d6837d6229b37e0dcb3.tar.gz |
mp3dec: read the initial/trailing padding from the LAME tag
Diffstat (limited to 'libavformat')
-rw-r--r-- | libavformat/mp3dec.c | 6 |
1 files 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); |