diff mbox series

[FFmpeg-devel,2/2] libavutil/random_seed: Skip testing generic seed twice

Message ID 20220125102109.522-2-michael@niedermayer.cc
State New
Headers show
Series [FFmpeg-devel,1/2] avutil/random_seed: Speed up fate test | expand


Context Check Description
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Michael Niedermayer Jan. 25, 2022, 10:21 a.m. UTC
If no platform specific random seed is supported then the generic code
was tested twice, this is unneeded

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
 libavutil/random_seed.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series


diff --git a/libavutil/random_seed.c b/libavutil/random_seed.c
index 509b74936c..a8be2d4991 100644
--- a/libavutil/random_seed.c
+++ b/libavutil/random_seed.c
@@ -141,5 +141,11 @@  uint32_t av_get_random_seed(void)
         return seed;
     if (read_random(&seed, "/dev/random")  == sizeof(seed))
         return seed;
+#if TEST
+    { // for testing we test get_generic_seed() seperatly so doing it here too is a waste of time
+        static int x;
+        return x++;
+    }
     return get_generic_seed();