diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 13:16:13 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-01 13:25:50 +0200 |
commit | 30aa004f0cf0b5ef4c81853ce26af691f61e639a (patch) | |
tree | 7e387aed6c4061e6cccc9dd35a3197ad169305c2 /libswresample/swresample_test.c | |
parent | bea3d19fbb81048e830e1e56e25207299589b394 (diff) | |
download | ffmpeg-30aa004f0cf0b5ef4c81853ce26af691f61e639a.tar.gz |
swr-test: allow randomizing mode differently each run.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswresample/swresample_test.c')
-rw-r--r-- | libswresample/swresample_test.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/libswresample/swresample_test.c b/libswresample/swresample_test.c index 6a6ba128b6..35eede231c 100644 --- a/libswresample/swresample_test.c +++ b/libswresample/swresample_test.c @@ -24,6 +24,9 @@ #include "libavutil/audioconvert.h" #include "libavutil/opt.h" #include "swresample.h" + +#undef time +#include "time.h" #undef fprintf #define SAMPLES 1000 @@ -245,6 +248,10 @@ int main(int argc, char **argv){ return 0; } num_tests = strtol(argv[1], NULL, 0); + if(num_tests < 0) { + num_tests = -num_tests; + rand_seed = time(0); + } if(num_tests<= 0 || num_tests>max_tests) num_tests = max_tests; } |