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;
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