X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=f20b53f8f1e5fe8d6c3a75f46bab167ce844ef3d;hb=4869bc5b2b604ddc9ac43f954f1448f6c868e571;hp=8de7c1ad4d6e846bb77e049cc7025cf745668bdf;hpb=27dde1bf85a1656f41f10ecb7f68af555bfa7dd3;p=swftools.git 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);