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

Martin Storsjö martin
Fri May 14 20:13:18 CEST 2010


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-ff_random_get_seed-public-by-renaming-to-av_-ex.patch
Type: text/x-diff
Size: 5202 bytes
Desc: 
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100514/01c33a83/attachment.patch>



More information about the ffmpeg-devel mailing list