From: kramm Date: Mon, 20 Sep 2004 16:18:08 +0000 (+0000) Subject: SWF files generated with -m are now always compressed. X-Git-Tag: release-0-6-2~45 X-Git-Url: http://git.asbjorn.it/?a=commitdiff_plain;h=4869bc5b2b604ddc9ac43f954f1448f6c868e571;p=swftools.git SWF files generated with -m are now always compressed. --- diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 8de7c1a..f20b53f 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -93,8 +93,14 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } - if (swf_WriteSWF(handle, swf)<0) - fprintf(stderr, "Unable to write output file: %s\n", sname); + if(global.version >= 6) { + if (swf_WriteSWC(handle, swf)<0) + fprintf(stderr, "Unable to write output file: %s\n", sname); + } else { + if (swf_WriteSWF(handle, swf)<0) + fprintf(stderr, "Unable to write output file: %s\n", sname); + } + if (handle != so) close(handle);