git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a4e70e9
)
frame rate calculation fix from Andrew Mace
author
kramm
<kramm>
Thu, 1 Apr 2004 07:57:44 +0000
(07:57 +0000)
committer
kramm
<kramm>
Thu, 1 Apr 2004 07:57:44 +0000
(07:57 +0000)
lib/rfxswf.c
patch
|
blob
|
history
diff --git
a/lib/rfxswf.c
b/lib/rfxswf.c
index
94049b2
..
14ec250
100644
(file)
--- a/
lib/rfxswf.c
+++ b/
lib/rfxswf.c
@@
-1206,6
+1206,7
@@
int swf_WriteSWF2(struct writer_t*writer, SWF * swf) // Writes SWF to file,
int frameCount=0;
struct writer_t zwriter;
int fileSize = 0;
int frameCount=0;
struct writer_t zwriter;
int fileSize = 0;
+ int inSprite = 0;
if (!swf) return -1;
if (!swf) return -1;
@@
-1225,10
+1226,12
@@
int swf_WriteSWF2(struct writer_t*writer, SWF * swf) // Writes SWF to file,
t = swf->firstTag;
frameCount = 0;
t = swf->firstTag;
frameCount = 0;
- while(t)
- { len += swf_WriteTag(-1, t);
- if (t->id==ST_SHOWFRAME) frameCount++;
- t = swf_NextTag(t);
+ while(t) {
+ len += swf_WriteTag(-1,t);
+ if(t->id == ST_DEFINESPRITE) inSprite++;
+ else if(t->id == ST_END && inSprite) inSprite--;
+ else if(t->id == ST_SHOWFRAME && !inSprite) frameCount++;
+ t = swf_NextTag(t);
}
{ TAG t1;
}
{ TAG t1;