[FFmpeg-devel] [PATCH 3/6] put_bits: make avpriv_align_put_bits() inline

Anton Khirnov anton at khirnov.net
Tue Oct 27 11:49:01 EET 2020


Quoting Andreas Rheinhardt (2020-10-26 15:21:26)
> Unnecessary: The code below also works for LE writers, now that the LE
> version of put_bits() is called.

Right, changed locally.

> 
> > diff --git a/libavcodec/version.h b/libavcodec/version.h
> > index 02ffa95749..78c4dd64ee 100644
> > --- a/libavcodec/version.h
> > +++ b/libavcodec/version.h
> > @@ -144,6 +144,8 @@
> >  #ifndef FF_API_UNUSED_CODEC_CAPS
> >  #define FF_API_UNUSED_CODEC_CAPS   (LIBAVCODEC_VERSION_MAJOR < 59)
> >  #endif
> > -
> > +#ifndef FF_API_AVPRIV_PUT_BITS
> > +#define FF_API_AVPRIV_PUT_BITS     (LIBAVCODEC_VERSION_MAJOR < 59)
> > +#endif
> >  
> 
> Why are you adding this instead of checking for LIBAVCODEC_VERSION_MAJOR
> < 59? After all, avpriv functions don't require a deprecation period and
> so there is no reason to postpone removing them to version 60.

Mainly so we don't forget to remove it during the bump, in my experience
people tend to forget to check for things that are under plain
#if VERSION. But I have no strong feelings either way.

-- 
Anton Khirnov


More information about the ffmpeg-devel mailing list