added protection against using both --cat and --stack
[swftools.git] / src / swfcombine.c
index 0891044..8981b1d 100644 (file)
@@ -137,7 +137,7 @@ int args_callback_option(char*name,char*val) {
     {
 
        float rate = atof(val);
-       if ((rate < 1.0/256) ||(rate >= 256.0)) {
+       if ((rate < 0) ||(rate >= 256.0)) {
            fprintf(stderr, "Error: You must specify a valid framerate between 1/256 and 255.\n");
            exit(1);
        }
@@ -1125,6 +1125,11 @@ int main(int argn, char *argv[])
        msg("<error> Can't combine --cat and --merge");
        exit(1);
     }
+    
+    if(config.stack && config.cat) {
+       msg("<error> Can't combine --cat and --stack");
+       exit(1);
+    }
 
     if(config.stack) {
        if(config.overlay) {
@@ -1234,6 +1239,12 @@ int main(int argn, char *argv[])
            combine(&master, slave_name[t], &slave, &newswf);
            master = newswf;
        }
+       if(config.dummy && !config.hassizex && !config.hassizey && !config.mastermovex && !config.mastermovey) {
+           newswf.movieSize.xmin = newswf.movieSize.xmin*config.masterscalex;
+           newswf.movieSize.ymin = newswf.movieSize.ymin*config.masterscaley;
+           newswf.movieSize.xmax = newswf.movieSize.xmax*config.masterscalex;
+           newswf.movieSize.ymax = newswf.movieSize.ymax*config.masterscaley;
+       }
     }
 
     fi = open(outputname, O_BINARY|O_RDWR|O_TRUNC|O_CREAT, 0777);