[FFmpeg-cvslog] audiogen: allow specifying random seed as a commandline parameter.

Anton Khirnov git at videolan.org
Sun Jul 29 02:26:22 CEST 2012


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Wed Jul  4 06:32:30 2012 +0200| [67ef5f4eb54297cb0448653ee59993c790c4cd3e] | committer: Anton Khirnov

audiogen: allow specifying random seed as a commandline parameter.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=67ef5f4eb54297cb0448653ee59993c790c4cd3e
---

 tests/audiogen.c |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/tests/audiogen.c b/tests/audiogen.c
index 8d27dc2..acb380d 100644
--- a/tests/audiogen.c
+++ b/tests/audiogen.c
@@ -144,8 +144,8 @@ int main(int argc, char **argv)
     int nb_channels = 2;
     char *ext;
 
-    if (argc < 2 || argc > 4) {
-        printf("usage: %s file [<sample rate> [<channels>]]\n"
+    if (argc < 2 || argc > 5) {
+        printf("usage: %s file [<sample rate> [<channels>] [<random seed>]]\n"
                "generate a test raw 16 bit audio stream\n"
                "If the file extension is .wav a WAVE header will be added.\n"
                "default: 44100 Hz stereo\n", argv[0]);
@@ -168,6 +168,9 @@ int main(int argc, char **argv)
         }
     }
 
+    if (argc > 4)
+        seed = atoi(argv[4]);
+
     outfile = fopen(argv[1], "wb");
     if (!outfile) {
         perror(argv[1]);



More information about the ffmpeg-cvslog mailing list