swr-test: allow randomizing mode differently each run.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/30/merge
Michael Niedermayer 13 years ago
parent bea3d19fbb
commit 30aa004f0c
  1. 7
      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;
}

Loading…
Cancel
Save