diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-06-07 21:45:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-07 21:45:52 +0200 |
commit | 67732b9d62576c67589773e5332e94aac429cc4c (patch) | |
tree | bb7e865164fd3ed8365be014d3b1bf420d347ff0 /tests/rotozoom.c | |
parent | b4d44367bc45b7bafd61c4bf59434bc517a6a440 (diff) | |
parent | a8656cd425babe6a2fe12aff826de57f28b8efcd (diff) | |
download | ffmpeg-67732b9d62576c67589773e5332e94aac429cc4c.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
mpegts: Remove disabled extension matching probe.
fate: avoid freopen(NULL) in videogen/rotozoom
Conflicts:
tests/rotozoom.c
tests/videogen.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'tests/rotozoom.c')
-rw-r--r-- | tests/rotozoom.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/rotozoom.c b/tests/rotozoom.c index 6604d92077..cfa7f81369 100644 --- a/tests/rotozoom.c +++ b/tests/rotozoom.c @@ -158,15 +158,16 @@ int main(int argc, char **argv) { int w, h, i; char buf[1024]; + int isdir = 0; - if (argc > 3) { - printf("usage: %s image.pnm [directory/]\n" + if (argc != 3) { + printf("usage: %s image.pnm file|dir\n" "generate a test video stream\n", argv[0]); return 1; } -// if (argc < 3) -// err_if(!freopen(NULL, "wb", stdout)); + if (!freopen(argv[2], "wb", stdout)) + isdir = 1; w = DEFAULT_WIDTH; h = DEFAULT_HEIGHT; @@ -181,7 +182,7 @@ int main(int argc, char **argv) for (i = 0; i < DEFAULT_NB_PICT; i++) { gen_image(i, w, h); - if (argc > 2) { + if (isdir) { snprintf(buf, sizeof(buf), "%s%02d.pgm", argv[2], i); pgmyuv_save(buf, w, h, rgb_tab); } else { |