projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a76371
)
mp3dec: read the initial/trailing padding from the LAME tag
author
Anton Khirnov
<anton@khirnov.net>
Fri, 1 Jul 2016 08:44:41 +0000
(10:44 +0200)
committer
Anton Khirnov
<anton@khirnov.net>
Fri, 15 Jul 2016 13:30:22 +0000
(15:30 +0200)
libavformat/mp3dec.c
patch
|
blob
|
history
diff --git
a/libavformat/mp3dec.c
b/libavformat/mp3dec.c
index
0838962
..
e282218
100644
(file)
--- 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);