Commit d60c2d52 authored by Anton Khirnov's avatar Anton Khirnov

mp3dec: read the initial/trailing padding from the LAME tag

parent 7a763714
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment