[FFmpeg-devel] [PATCH 3/5] avcodec: add max_samples

Tomas Härdin tjoppen at acc.umu.se
Tue Sep 3 13:21:26 EEST 2019


tis 2019-09-03 klockan 09:20 +0200 skrev Paul B Mahol:
> 
> On 9/3/19, Michael Niedermayer <michael at niedermayer.cc> wrote:
> > TODO: APIChanges, bump version
> > 
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >  libavcodec/avcodec.h                 | 8 ++++++++
> >  libavcodec/options_table.h           | 1 +
> >  tests/ref/fate/api-mjpeg-codec-param | 2 ++
> >  tests/ref/fate/api-png-codec-param   | 2 ++
> >  4 files changed, 13 insertions(+)
> > 
> > diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> > index de4feb6a65..4b771a6ae6 100644
> > --- a/libavcodec/avcodec.h
> > +++ b/libavcodec/avcodec.h
> > @@ -3371,6 +3371,14 @@ typedef struct AVCodecContext {
> >       * - encoding: unused
> >       */
> >      int discard_damaged_percentage;
> > +
> > +    /**
> > +     * The number of samples per frame to maximally accept.
> > +     *
> > +     * - decoding: set by user
> > +     * - encoding: set by user
> > +     */
> > +    int64_t max_samples;
> >  } AVCodecContext;
> 
> NAK, you can use max_pixels for the same cause.

Or the other way around. Has max_pixels made it to an official release
yet? Using it for samples is obviously confusing

Hot take: AVCodec is way overdue for a split into ACodec and VCodec
(and SCodec and so on), with AVCodec being a typed union

/Tomas



More information about the ffmpeg-devel mailing list