X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfcombine.c;h=b1b0d693d90fcc20c227f1c9c9e839847e84e598;hb=6544ad13113643977bc2ea9c52919547b4f19060;hp=13ff22429263883826011e5c49c54e9eca7801a3;hpb=2cfbc88cecba80338fe890bbf67d6a2b92275cf7;p=swftools.git diff --git a/src/swfcombine.c b/src/swfcombine.c index 13ff224..b1b0d69 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -1034,6 +1034,9 @@ void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) slaveid = -1; slaveframe = -1; + if(!master->fileVersion && slave) + master->fileVersion = slave->fileVersion; + swf_FoldAll(master); swf_FoldAll(slave); @@ -1045,16 +1048,19 @@ void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) if(config.isframe) { - int tmp; - if(slavename && slavename[0]!='#' && (sscanf(slavename, "%d", &tmp) == - strlen(slavename))) { - /* if the name the slave should replace - consists only of digits and the -f - option is given, it probably is not - a frame name but a frame number. - */ - slaveid = tmp; - slavename = 0; + if(slavename && slavename[0]!='#') { + int tmp; + int len; + sscanf(slavename, "%d%n", &tmp, &len); + if(len == strlen(slavename)) { + /* if the name the slave should replace + consists only of digits and the -f + option is given, it probably is not + a frame name but a frame number. + */ + slaveid = tmp; + slavename = 0; + } } if(slaveid>=0) { @@ -1125,6 +1131,11 @@ int main(int argn, char *argv[]) msg(" Can't combine --cat and --merge"); exit(1); } + + if(config.stack && config.cat) { + msg(" Can't combine --cat and --stack"); + exit(1); + } if(config.stack) { if(config.overlay) { @@ -1227,7 +1238,7 @@ int main(int argn, char *argv[]) memset(&slave, 0, sizeof(slave)); slave.firstTag = swf_InsertTag(0, ST_END); slave.frameRate = 0; - slave.fileVersion = 4; + slave.fileVersion = 0; slave.frameCount = 0; } @@ -1242,6 +1253,9 @@ int main(int argn, char *argv[]) } } + if(!newswf.fileVersion) + newswf.fileVersion = 4; + fi = open(outputname, O_BINARY|O_RDWR|O_TRUNC|O_CREAT, 0777); if(config.zlib) {