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

Michael Niedermayer michael at niedermayer.cc
Fri May 27 04:51:41 CEST 2016


On Wed, May 25, 2016 at 09:56:59AM -0700, Jon Toohill wrote:
> ---
>  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;

is the 528 + 1 difference intended to start_skip_samples/first_discard_sample
?
mp3enc stores par->initial_padding - 528 - 1

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

If you drop bombs on a foreign country and kill a hundred thousand
innocent people, expect your government to call the consequence
"unprovoked inhuman terrorist attacks" and use it to justify dropping
more bombs and killing more people. The technology changed, the idea is old.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160527/a2dc52d9/attachment.sig>


More information about the ffmpeg-devel mailing list