X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fmodules%2Fswftools.c;h=426ea41cd828f45c152545c18854cd59b3411d32;hb=f5fc42d1a3f5a637f00a2316af960dc32371cf48;hp=1b01357d425b4b34934f2d5d3fa4a6a1b6ff6344;hpb=6edd030417e792d2325d5d6b89a6495ab8798cba;p=swftools.git diff --git a/lib/modules/swftools.c b/lib/modules/swftools.c index 1b01357..426ea41 100644 --- a/lib/modules/swftools.c +++ b/lib/modules/swftools.c @@ -23,6 +23,8 @@ // Matrix & Math tools for SWF files +#include "../rfxswf.h" + #define S64 long long SFIXED RFXSWF_SP(SFIXED a1,SFIXED a2,SFIXED b1,SFIXED b2) { S64 a = ((S64)a1*(S64)b1+(S64)a2*(S64)b2)>>16; @@ -684,7 +686,7 @@ void enumerateUsedIDs(TAG * tag, int base, void (*callback)(TAG*, int, void*), v /* I never saw recursive sprites, but they are (theoretically) possible, so better add base here again */ enumerateUsedIDs(tag2, tag->pos + base, callback, callback_data); - swf_DeleteTag(tag2); + swf_DeleteTag(0, tag2); swf_GetBlock(tag, NULL, len); } } @@ -1266,9 +1268,7 @@ void swf_Optimize(SWF*swf) /* we found two identical tags- remap one of them */ remap[id] = swf_GetDefineID(tag2); - swf_DeleteTag(tag); - if(tag == swf->firstTag) - swf->firstTag = next; + swf_DeleteTag(swf, tag); } } else if(swf_isPseudoDefiningTag(tag)) { int id = swf_GetDefineID(tag); @@ -1276,9 +1276,7 @@ void swf_Optimize(SWF*swf) /* if this tag was remapped, we don't need the helper tag anymore. Discard it. */ - swf_DeleteTag(tag); - if(tag == swf->firstTag) - swf->firstTag = next; + swf_DeleteTag(swf, tag); } }