[FFmpeg-devel] Re: [PATCH 1/2] lavc: deprecate AV_CODEC_FLAG_TRUNCATED

Anton Khirnov anton at khirnov.net
Mon Mar 8 15:37:32 EET 2021


Quoting Andreas Rheinhardt (2021-03-08 13:24:32)
> Anton Khirnov:
> > It is supported only by two decoders and is entirely redundant with
> > parsers.
> 
> Just because it is only used in two files doesn't mean it is only used
> by two decoders: Six decoders have the AV_CODEC_CAP_TRUNCATED (which you
> forgot to deprecate) set.
> 
> (fftools/cmdutils.c checks for AV_CODEC_CAP_TRUNCATED and informs the
> user about whether it is supported by a codec or not. It should probably
> be wrapped in #if LIBAVCODEC_VERSION_MAJOR < 60 checks.)
> 
> > ---
> >  doc/APIchanges             |  3 +++
> >  libavcodec/avcodec.h       |  4 ++++
> >  libavcodec/decode.c        |  6 +++++-
> >  libavcodec/h263dec.c       | 10 ++++++++--
> >  libavcodec/mpeg12dec.c     | 12 +++++++++++-
> >  libavcodec/mpegvideo.c     |  6 ++++++
> >  libavcodec/mpegvideo.h     |  2 ++
> >  libavcodec/options_table.h |  2 ++
> >  libavcodec/pthread.c       |  2 ++
> >  libavcodec/version.h       |  3 +++
> >  10 files changed, 46 insertions(+), 4 deletions(-)
> > 
> > diff --git a/doc/APIchanges b/doc/APIchanges
> > index 4027d599e7..344f484a8b 100644
> > --- a/doc/APIchanges
> > +++ b/doc/APIchanges
> > @@ -15,6 +15,9 @@ libavutil:     2017-10-21
> >  
> >  API changes, most recent first:
> >  
> > +2021-03-xx - xxxxxxxxxx - avcodec.h
> 
> Missing version
[...]
> > diff --git a/libavcodec/version.h b/libavcodec/version.h
> > index 169c763e8a..d3e813428b 100644
> > --- a/libavcodec/version.h
> > +++ b/libavcodec/version.h
> > @@ -162,5 +162,8 @@
> 
> Missing minor version bump.

That is intentional. I see no reason to bump version, because nothing in
the API or ABI changes with this patch.

We bump the version when new APIs are added to allow users to test
whether that API is present. But it makes no sense for the users to
check whether this flag (or anything else) is deprecated, since
deprecation is merely a declaration of intent to change something in the
future.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list