[FFmpeg-devel] [PATCH] change the order of params for av_init_random()

Michael Niedermayer michaelni
Mon Aug 18 00:22:00 CEST 2008


On Sun, Aug 17, 2008 at 10:44:48PM +0100, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Sun, Aug 17, 2008 at 10:06:01PM +0100, M?ns Rullg?rd wrote:
> >> Justin Ruggles <justinruggles at bellsouth.net> writes:
> > [...]
> >> > Index: libavutil/random.c
> >> > ===================================================================
> >> > --- libavutil/random.c	(revision 14819)
> >> > +++ libavutil/random.c	(working copy)
> >> > @@ -36,7 +36,7 @@
> >> >  #define LOWER_MASK 0x7fffffff /* least significant r bits */
> >> >  
> >> >  /** initializes mt[AV_RANDOM_N] with a seed */
> >> > -void av_init_random(unsigned int seed, AVRandomState *state)
> >> > +void av_init_random(AVRandomState *state, unsigned int seed)
> >> 
> >> This requires a major version bump, since it breaks ABI.
> >
> > i dont think anyone is using it, besides its not hard to add a
> 
> The header is installed, so we have to assume that somebody might be
> using it.  Changing this would cause those apps to start crashing for
> no apparent reason.

non existing apps crashing ...


> 
> > av_init_random2() and make av_init_random() call it if someone
> > wants it.
> 
> This is another option, but is it really worth it just to change the
> order of arguments?

I think it is because it improves consistency and readability, taken on
its own its rather minor but still it should be fixed, it just costs us

#if version <
av_init_random(b,a)
{
    av_init_random2(a,b)
}
#endif

until the next major bump ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

There will always be a question for which you do not know the correct awnser.
-------------- 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/20080818/49cab74d/attachment.pgp>



More information about the ffmpeg-devel mailing list