From 5b56c4417a0662c47d6851f11cdeaf5049e6cb34 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 12 Jan 2004 18:07:56 +0000 Subject: [PATCH] framerate are now real fps, not 100fps. --- src/swfcombine.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/swfcombine.c b/src/swfcombine.c index cc3bffc..cc679f5 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -133,7 +133,13 @@ int args_callback_option(char*name,char*val) { } else if (!strcmp(name, "r")) { - config.framerate = atoi(val)*256/100; + + float rate = atof(val); + if ((rate < 1.0/256) ||(rate >= 256.0)) { + fprintf(stderr, "Error: You must specify a valid framerate between 1/256 and 255.\n"); + exit(1); + } + config.framerate = (int)(rate*256); return 1; } else if (!strcmp(name, "X")) @@ -268,7 +274,7 @@ void args_callback_usage(char*name) printf("-x xpos --movex x Adjust position of slave by xpos twips (1/20 pixel)\n"); printf("-y ypos --movey y Adjust position of slave by ypos twips (1/20 pixel)\n"); printf("-s scale --scale Adjust size of slave by scale%\n"); - printf("-r framerate --rate Set movie framerate (100 frames/sec)\n"); + printf("-r framerate --rate Set movie framerate (frames/sec)\n"); printf("-X width --width Force movie width to scale (default: use master width (not with -t))\n"); printf("-Y height --height Force movie height to scale (default: use master height (not with -t))\n"); printf("-z zlib --zlib Enable Flash 6 (MX) Zlib Compression\n"); -- 1.7.10.4