X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=src%2Fjpeg2swf.c;h=da3c3189bb8e653fa8196107f4eb3def50805b95;hp=7c1298f96f8a554f6b429f671135157f7d0dd534;hb=70dd52c811db9f1a38a472a37135986accc4c06e;hpb=15771c177b875ca1f233e8aa725283ce1a559091 diff --git a/src/jpeg2swf.c b/src/jpeg2swf.c index 7c1298f..da3c318 100644 --- a/src/jpeg2swf.c +++ b/src/jpeg2swf.c @@ -136,13 +136,11 @@ int MovieFinish(SWF * swf, TAG * t, char *sname) sname = "output.swf"; handle = open(sname, O_BINARY | O_RDWR | O_CREAT | O_TRUNC, 0666); } - 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<0 && sname) { + perror(sname); } + if (swf_WriteSWF(handle, swf)<0) + fprintf(stderr, "Unable to write output file: %s\n", sname); if (handle != so) close(handle); @@ -548,6 +546,7 @@ static struct options_t options[] = { {"y", "yoffset"}, {"X", "width"}, {"Y", "height"}, +{"T", "flashversion"}, {"v", "verbose"}, {"V", "version"}, {"f", "fit-to-movie"}, @@ -595,6 +594,7 @@ void args_callback_usage(char *name) printf("-y , --yoffset vertically offset images by \n"); printf("-X , --width Force movie width to (default: autodetect)\n"); printf("-Y , --height Force movie height to (default: autodetect)\n"); + printf("-T , --flashversion Set flash file version to \n"); printf("-v , --verbose Set verbose level to (0=quiet, 1=default, 2=debug)\n"); printf("-V , --version Print version information and exit\n"); printf("-f , --fit-to-movie Fit images to movie size\n");