SWF files generated with -m are now always compressed.
authorkramm <kramm>
Mon, 20 Sep 2004 16:18:08 +0000 (16:18 +0000)
committerkramm <kramm>
Mon, 20 Sep 2004 16:18:08 +0000 (16:18 +0000)
src/jpeg2swf.c

index 8de7c1a..f20b53f 100644 (file)
@@ -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);
     }
            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);
 
     if (handle != so)
        close(handle);