swr-test: allow randomizing mode differently each run.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2012-05-01 13:16:13 +02:00
parent bea3d19fbb
commit 30aa004f0c

View File

@ -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;
}