[FFmpeg-devel] [PATCH] Use LIBAVCODEC_BUILD rather than the deprecated avcodec_build() in cmdutils.c:show_version()

Stefano Sabatini stefano.sabatini-lala
Mon Jul 14 00:27:08 CEST 2008


On date Sunday 2008-07-13 23:35:03 +0200, Michael Niedermayer encoded:
> On Sun, Jul 13, 2008 at 11:21:35PM +0200, Stefano Sabatini wrote:
> > On date Sunday 2008-07-13 22:57:15 +0200, Michael Niedermayer encoded:
> > > On Sun, Jul 13, 2008 at 07:08:44PM +0200, Stefano Sabatini wrote:
> > > > avcodec_build() has been deprecated, LIBAV*_BUILD also look pointless
> > > > so it seems better to directly use LIBAV*_VERSION_INT instead.
> > > > 
> > > > Regards.
> > > > -- 
> > > > FFmpeg = Faboulous and Fostering Multimedia Pitiless Explosive God
> > > 
> > > > Index: cmdutils.c
> > > > ===================================================================
> > > > --- cmdutils.c	(revision 14208)
> > > > +++ cmdutils.c	(working copy)
> > > > @@ -223,7 +223,7 @@
> > > >             "libavcodec  %d\n"
> > > >             "libavformat %d\n"
> > > >             "libavdevice %d\n",
> > > > -           LIBAVUTIL_BUILD, avcodec_build(), LIBAVFORMAT_BUILD, LIBAVDEVICE_BUILD);
> > > > +           LIBAVUTIL_VERSION_INT, LIBAVCODEC_VERSION_INT, LIBAVFORMAT_VERSION_INT, LIBAVDEVICE_VERSION_INT);
> > > 
> > > not ok
> > > avcodec_build() is not the same as LIBAVCODEC_VERSION_INT
> > 
> > That's right, new patch attached.
> [...]
> > -           LIBAVUTIL_BUILD, avcodec_build(), LIBAVFORMAT_BUILD, LIBAVDEVICE_BUILD);
> > +           LIBAVUTIL_BUILD, LIBAVCODEC_BUILD, LIBAVFORMAT_BUILD, LIBAVDEVICE_BUILD);
> 
> avcodec_build() is also not the same as LIBAVCODEC_BUILD
> 
> Let me give you a hint
> avcodec_build() returns the "build" of the linked library
> LIBAVCODEC_BUILD returns the "build" of the included header

Thanks Michael and M?ns for the explanation. So I think the better
solution looks like to use av*_version() for all the version numbers,
which requires to apply this before:
http://thread.gmane.org/4877156B.8000101 at lonelycoder.com

Regards.
-- 
FFmpeg = Faboulous and Frenzy Majestic Pitiful Enigmatic Gadget




More information about the ffmpeg-devel mailing list