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/rotozoom.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/rotozoom.c')
-rw-r--r-- | tests/rotozoom.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/tests/rotozoom.c b/tests/rotozoom.c index afe16822fd..296ab701f5 100644 --- a/tests/rotozoom.c +++ b/tests/rotozoom.c @@ -159,12 +159,15 @@ int main(int argc, char **argv) int w, h, i; char buf[1024]; - if (argc != 3) { - printf("usage: %s directory/ image.pnm\n" + if (argc > 3) { + printf("usage: %s image.pnm [directory/]\n" "generate a test video stream\n", argv[0]); return 1; } + if (argc < 3) + err_if(!freopen(NULL, "wb", stdout)); + w = DEFAULT_WIDTH; h = DEFAULT_HEIGHT; @@ -173,13 +176,17 @@ int main(int argc, char **argv) width = w; height = h; - if (init_demo(argv[2])) + if (init_demo(argv[1])) return 1; 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 > 2) { + snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[2], i); + pgmyuv_save(buf, w, h, rgb_tab); + } else { + pgmyuv_save(NULL, w, h, rgb_tab); + } } free(rgb_tab); |