# HG changeset patch # User mstorsjo # Date 1274604820 0 # Node ID 1ff442f2660c6fb4c9326108b992af267118a5e8 # Parent d45ace227adf6a343e12a95b0556091dd732b5aa Make ff_random_get_seed public, rename to av_get_random_seed, export the header Keep an old ff_ named function for binary compatibility until the next major bump. diff -r d45ace227adf -r 1ff442f2660c Makefile --- a/Makefile Wed May 19 22:51:38 2010 +0000 +++ b/Makefile Sun May 23 08:53:40 2010 +0000 @@ -19,6 +19,7 @@ mem.h \ pixdesc.h \ pixfmt.h \ + random_seed.h \ rational.h \ sha1.h \ diff -r d45ace227adf -r 1ff442f2660c random_seed.c --- a/random_seed.c Wed May 19 22:51:38 2010 +0000 +++ b/random_seed.c Sun May 23 08:53:40 2010 +0000 @@ -22,8 +22,9 @@ #include #include "timer.h" #include "random_seed.h" +#include "avutil.h" -uint32_t ff_random_get_seed(void) +uint32_t av_get_random_seed(void) { uint32_t seed; int fd; @@ -42,3 +43,11 @@ // XXX what to do ? return seed; } + +#if LIBAVUTIL_VERSION_MAJOR < 51 +attribute_deprecated uint32_t ff_random_get_seed(void); +uint32_t ff_random_get_seed(void) +{ + return av_get_random_seed(); +} +#endif diff -r d45ace227adf -r 1ff442f2660c random_seed.h --- a/random_seed.h Wed May 19 22:51:38 2010 +0000 +++ b/random_seed.h Sun May 23 08:53:40 2010 +0000 @@ -26,6 +26,6 @@ /** * Gets a seed to use in conjunction with random functions. */ -uint32_t ff_random_get_seed(void); +uint32_t av_get_random_seed(void); #endif /* AVUTIL_RANDOM_SEED_H */