[FFmpeg-devel] [PATCH] Rename ff_random_get_seed to av_*, export the header

Michael Niedermayer michaelni
Sun May 16 02:13:14 CEST 2010


On Fri, May 14, 2010 at 09:13:18PM +0300, Martin Storsj? wrote:
> On Fri, 14 May 2010, Michael Niedermayer wrote:
> 
> > On Fri, May 14, 2010 at 11:57:46AM +0300, Martin Storsj? wrote:
> > > On Fri, 14 May 2010, Benoit Fouet wrote:
> > > 
> > > > On Fri, 14 May 2010 11:00:29 +0300 (EEST) Martin Storsj? wrote:
> > > > > On Fri, 14 May 2010, Benoit Fouet wrote:
> > > > > 
> > > > > > On Fri, 14 May 2010 09:57:58 +0300 (EEST) Martin Storsj? wrote:
> > > > > > > diff --git a/libavutil/random_seed.h b/libavutil/random_seed.h
> > > > > > > index a954381..db4fe5d 100644
> > > > > > > --- a/libavutil/random_seed.h
> > > > > > > +++ b/libavutil/random_seed.h
> > > > > > [...]
> > > > > > > +#if LIBAVUTIL_VERSION_MAJOR < 51
> > > > > > > +attribute_deprecated uint32_t ff_random_get_seed(void);
> > > > > > > +#endif
> > > > > > >  
> > > > > > 
> > > > > > I don't think this one should be added.
> > > > > > The ffmpeg tree should be fixed instead.
> > > > > 
> > > > > Yes, it is fixed in the second patch. But it is still needed after that.
> > > > > 
> > > > > Current versions of libavformat link directly to this symbol, and if the 
> > > > > libavutil shared library is updated to a version without the symbol, the 
> > > > > older libavformat will fail to load.
> > > > 
> > > > why ? It should link.
> > > > You have defined the symbol, I just don't see why you should add a
> > > > prototype for it.
> > > 
> > > Ah, you meant only the prototype, not the whole backwards compatibility 
> > > function as such, I misunderstood.
> > > 
> > > With the current compiler flags, you'd get a
> > > libavutil/random_seed.c:48: error: no previous prototype for 
> > > 'ff_random_get_seed'
> > > error if the prototype is missing.
> > 
> > i think the prototype could be put in the c file then
> 
> Ok, so like this then?
> 
> // Martin
>  ffserver.c               |    2 +-
>  libavfilter/parseutils.c |    2 +-
>  libavformat/httpauth.c   |    2 +-
>  libavformat/mxfenc.c     |    2 +-
>  libavformat/rtpenc.c     |    4 ++--
>  libavutil/Makefile       |    1 +
>  libavutil/random_seed.c  |   11 ++++++++++-
>  libavutil/random_seed.h  |    2 +-
>  8 files changed, 18 insertions(+), 8 deletions(-)
> 1d2ada2b075c0d791fee7372045b93fc0ba4e5f4  0001-Make-ff_random_get_seed-public-by-renaming-to-av_-ex.patch
> From d55c1e853481be06e28f6edf01bc2be7327ed301 Mon Sep 17 00:00:00 2001
> From: Martin Storsjo <martin at martin.st>
> Date: Fri, 14 May 2010 09:48:23 +0300
> Subject: [PATCH] Make ff_random_get_seed public by renaming to av_*, export the header
> 
> Keep an old ff_ named function for binary compatibility until the
> next major bump.

maybe the returnd value should be 64 bit instead of 32?

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Concerning the gods, I have no means of knowing whether they exist or not
or of what sort they may be, because of the obscurity of the subject, and
the brevity of human life -- Protagoras
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100516/2a25cb86/attachment.pgp>



More information about the ffmpeg-devel mailing list