From 4869bc5b2b604ddc9ac43f954f1448f6c868e571 Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 20 Sep 2004 16:18:08 +0000 Subject: [PATCH] SWF files generated with -m are now always compressed. --- src/jpeg2swf.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) 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); -- 1.7.10.4