diff mbox

[FFmpeg-devel,4/4] lavf/mp3dec: read encoder delay/padding from Info tag

Message ID 1475087343-29745-6-git-send-email-jtoohill@google.com
State Superseded
Headers show

Commit Message

Jon Toohill Sept. 28, 2016, 6:29 p.m. UTC
---
 libavformat/mp3dec.c | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 56c7f8c..9cc85a3 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -239,6 +239,8 @@  static void mp3_parse_info_tag(AVFormatContext *s, AVStream *st,
 
         mp3->start_pad = v>>12;
         mp3->  end_pad = v&4095;
+        st->codecpar->initial_padding = mp3->start_pad + 528 + 1;
+        st->codecpar->trailing_padding = mp3->end_pad;
         st->start_skip_samples = mp3->start_pad + 528 + 1;
         if (mp3->frames) {
             st->first_discard_sample = -mp3->end_pad + 528 + 1 + mp3->frames * (int64_t)spf;