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

Ronald S. Bultje rsbultje at gmail.com
Wed May 25 20:18:38 CEST 2016


Hi,

On Wed, May 25, 2016 at 1:24 PM, James Almer <jamrial at gmail.com> wrote:

> On 5/25/2016 1:56 PM, 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;
>
> Every other format so far is using the AV_PKT_DATA_SKIP_SAMPLES side data
> to
> discard samples from the last packet/frame. See matroska and ogg demuxers,
> currently used for Opus only.
>
> The trailing_padding AVCodecParameters element was added after the above
> was
> designed. To be honest i can't say if we should replace one with the other
> or find a way to keep both, and seeing how AVCodecParameters hasn't made it
> to a release yet, we're still on time to choose.


I agree having 1 is better than having 2. I can't technically comment on
which one is better/easier/*.

Ronald


More information about the ffmpeg-devel mailing list