mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-01-03 13:32:10 +00:00
swr-test: allow randomizing mode differently each run.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
bea3d19fbb
commit
30aa004f0c
@ -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…
Reference in New Issue
Block a user