git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added tests for \x00, \xff
[swftools.git]
/
src
/
swfcombine.c
diff --git
a/src/swfcombine.c
b/src/swfcombine.c
index
1204cc1
..
25698ee
100644
(file)
--- a/
src/swfcombine.c
+++ b/
src/swfcombine.c
@@
-314,6
+314,7
@@
static void makestackmaster(SWF*swf)
SRECT box;
int fileversion = config.zlib?6:3;
int frameRate = 256;
SRECT box;
int fileversion = config.zlib?6:3;
int frameRate = 256;
+ U32 fileAttributes = 0;
RGBA rgb;
rgb.r=rgb.b=rgb.g=0;
memset(&box, 0, sizeof(box));
RGBA rgb;
rgb.r=rgb.b=rgb.g=0;
memset(&box, 0, sizeof(box));
@@
-331,7
+332,9
@@
static void makestackmaster(SWF*swf)
}
close(fi);
swf_RemoveJPEGTables(&head);
}
close(fi);
swf_RemoveJPEGTables(&head);
+ fileAttributes |= head.fileAttributes;
removeCommonTags(&head);
removeCommonTags(&head);
+
msg("<verbose> File %s has bounding box %d:%d:%d:%d\n",
slave_filename[t],
head.movieSize.xmin, head.movieSize.ymin,
msg("<verbose> File %s has bounding box %d:%d:%d:%d\n",
slave_filename[t],
head.movieSize.xmin, head.movieSize.ymin,
@@
-371,6
+374,7
@@
static void makestackmaster(SWF*swf)
swf->fileVersion = fileversion;
swf->movieSize = box;
swf->frameRate = frameRate;
swf->fileVersion = fileversion;
swf->movieSize = box;
swf->frameRate = frameRate;
+ swf->fileAttributes = fileAttributes;
swf->firstTag = swf_InsertTag(0, ST_SETBACKGROUNDCOLOR);
tag = swf->firstTag;
swf->firstTag = swf_InsertTag(0, ST_SETBACKGROUNDCOLOR);
tag = swf->firstTag;
@@
-1018,8
+1022,12
@@
void normalcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
if (spriteid<0 && !config.isframe) {
if(slavename) {
if (spriteid<0 && !config.isframe) {
if(slavename) {
- if(strcmp(slavename,"!!dummy!!"))
+ if(strcmp(slavename,"!!dummy!!")) {
msg("<warning> Didn't find anything named %s in file. No substitutions will occur.", slavename);
msg("<warning> Didn't find anything named %s in file. No substitutions will occur.", slavename);
+ if(!strcmp(slavename, "swf")) {
+ msg("<warning> (If you were trying to combine rfxview with a document, try replacing 'swf' with 'viewport'.");
+ }
+ }
}
else
msg("<warning> Didn't find id %d in file. No substitutions will occur.", slaveid);
}
else
msg("<warning> Didn't find id %d in file. No substitutions will occur.", slaveid);
@@
-1058,7
+1066,7
@@
void normalcombine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
FLAGS_WRITEDEFINES|FLAGS_WRITENONDEFINES| FLAGS_WRITESPRITE );
}
FLAGS_WRITEDEFINES|FLAGS_WRITENONDEFINES| FLAGS_WRITESPRITE );
}
- swf_DeleteTag(newswf, tag);
+ swf_DeleteTag(newswf, newswf->firstTag);
}
void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
}
void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
@@
-1069,6
+1077,8
@@
void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf)
if(!master->fileVersion && slave)
master->fileVersion = slave->fileVersion;
if(!master->fileVersion && slave)
master->fileVersion = slave->fileVersion;
+
+ master->fileAttributes |= slave->fileAttributes;
swf_FoldAll(master);
swf_FoldAll(slave);
swf_FoldAll(master);
swf_FoldAll(slave);