diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-05-30 01:39:24 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-05-30 01:40:54 +0200 |
commit | b0387edd5e766b1032f946d6cdb35b765bb45435 (patch) | |
tree | dd3ca8577a8d3b05efee8b1214a80f845ddeb47f /tests/videogen.c | |
parent | 8619362ff1de6605ffe6da8a42bdfe4fb7be75c1 (diff) | |
parent | f919cc7df6ab844bc12f89fe7bef4fb915a47725 (diff) | |
download | ffmpeg-b0387edd5e766b1032f946d6cdb35b765bb45435.tar.gz |
Merge commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725'
* commit 'f919cc7df6ab844bc12f89fe7bef4fb915a47725':
fate: fix acodec/vsynth tests for make 3.81
pcm_mpeg: fix number of consumed bytes to include the header.
avfilter: include required header file avfilter.h in video.h
x86: Avoid movs on BUTTERFLYPS when in AVX mode
x86: use new schema for ASM macros
fate: convert codec-regression.sh to makefile rules
fate: allow tests to specify unit size for psnr comparison
fate: teach videogen/rotozoom to output a single raw video stream
http: Add support for reusing the http socket for subsequent requests
http: Add support for using persistent connections
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests/videogen.c')
-rw-r--r-- | tests/videogen.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/videogen.c b/tests/videogen.c index f151f3edf8..aa4b767ded 100644 --- a/tests/videogen.c +++ b/tests/videogen.c @@ -146,12 +146,15 @@ int main(int argc, char **argv) int w, h, i; char buf[1024]; - if (argc != 2) { - printf("usage: %s file\n" + if (argc > 2) { + printf("usage: %s [file]\n" "generate a test video stream\n", argv[0]); exit(1); } + if (argc < 2) + err_if(!freopen(NULL, "wb", stdout)); + w = DEFAULT_WIDTH; h = DEFAULT_HEIGHT; @@ -161,9 +164,13 @@ int main(int argc, char **argv) height = h; for (i = 0; i < DEFAULT_NB_PICT; i++) { - snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[1], i); gen_image(i, w, h); - pgmyuv_save(buf, w, h, rgb_tab); + if (argc > 1) { + snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[1], i); + pgmyuv_save(buf, w, h, rgb_tab); + } else { + pgmyuv_save(NULL, w, h, rgb_tab); + } } free(rgb_tab); |