[FFmpeg-devel] [mpegaudio_parser] Skip trailing junk data when flushing parser.

Dale Curtis dalecurtis at chromium.org
Mon Feb 26 20:30:26 EET 2018


On Fri, Feb 23, 2018 at 7:01 PM, Michael Niedermayer <michael at niedermayer.cc
> wrote:
>
> this goes the wrong direction.
> Parsers should not discard data by default. The code we have for tags is a
> hack.
> There are many better ways to handle this.
> Something similar to a AV_PKT_FLAG_CORRUPT set be the parser would be an
> example. This could then optionally be discarded
>

It's not just the trailing tags though, skipping bad data is fundamental to
how this parser works. Even if we change it so that we mark the last packet
corrupt, midstream the parser is still designed to skip over everything
that doesn't look like an mp3 frame. I.e., the data between mp3 frames is
just dropped wholesale.

Are you proposing we rework the mp3 parser entirely to not drop any data
anymore or just not drop the trailing data?

- dale


More information about the ffmpeg-devel mailing list