[FFmpeg-devel] [PATCH 1/2] lavf/mp3dec: pass Xing gapless metadata to AVCodecParameters

Jon Toohill jtoohill at google.com
Wed May 25 18:56:59 CEST 2016


---
 libavformat/mp3dec.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index 3725d67..192f5ef 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -234,6 +234,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;
+        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;
-- 
2.8.0.rc3.226.g39d4020



More information about the ffmpeg-devel mailing list