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:
f27ce8f
)
added swf_CopySWF() function.
author
kramm
<kramm>
Wed, 17 Nov 2004 17:42:09 +0000
(17:42 +0000)
committer
kramm
<kramm>
Wed, 17 Nov 2004 17:42:09 +0000
(17:42 +0000)
lib/rfxswf.c
patch
|
blob
|
history
lib/rfxswf.h
patch
|
blob
|
history
diff --git
a/lib/rfxswf.c
b/lib/rfxswf.c
index
e6f30c1
..
ae33ad5
100644
(file)
--- a/
lib/rfxswf.c
+++ b/
lib/rfxswf.c
@@
-1488,6
+1488,21
@@
int swf_WriteCGI(SWF * swf)
return swf_WriteSWF(fileno(stdout),swf);
}
return swf_WriteSWF(fileno(stdout),swf);
}
+SWF* swf_CopySWF(SWF*swf)
+{
+ SWF*nswf = rfx_alloc(sizeof(SWF));
+ memcpy(nswf, swf, sizeof(SWF));
+ nswf->firstTag = 0;
+ TAG*tag = swf->firstTag;
+ TAG*ntag = 0;
+ while(tag) {
+ ntag = swf_CopyTag(ntag, tag);
+ if(!nswf->firstTag)
+ nswf->firstTag = ntag;
+ }
+ return nswf;
+}
+
void swf_FreeTags(SWF * swf) // Frees all malloc'ed memory for tags
{ TAG * t = swf->firstTag;
void swf_FreeTags(SWF * swf) // Frees all malloc'ed memory for tags
{ TAG * t = swf->firstTag;
diff --git
a/lib/rfxswf.h
b/lib/rfxswf.h
index
23bd0e1
..
1b40494
100644
(file)
--- a/
lib/rfxswf.h
+++ b/
lib/rfxswf.h
@@
-202,6
+202,7
@@
int swf_WriteSWF(int handle,SWF * swf); // Writes SWF to file, returns lengt
int swf_WriteSWC(int handle, SWF * swf); // for convenience, equal to swf->compressed=1;swf_WriteSWF(..)
int swf_WriteCGI(SWF * swf); // Outputs SWF with valid CGI header to stdout
void swf_FreeTags(SWF * swf); // Frees all malloc'ed memory for swf
int swf_WriteSWC(int handle, SWF * swf); // for convenience, equal to swf->compressed=1;swf_WriteSWF(..)
int swf_WriteCGI(SWF * swf); // Outputs SWF with valid CGI header to stdout
void swf_FreeTags(SWF * swf); // Frees all malloc'ed memory for swf
+SWF* swf_CopySWF(SWF*swf);
// for streaming:
int swf_WriteHeader(int handle,SWF * swf); // Writes Header of swf to file
// for streaming:
int swf_WriteHeader(int handle,SWF * swf); // Writes Header of swf to file