From 495eb07179f8739f49496cfe79223cd85baf2bdd Mon Sep 17 00:00:00 2001 From: kramm Date: Mon, 20 May 2002 12:05:17 +0000 Subject: [PATCH] minor fixes. --- src/jpeg2swf.1 | 2 +- src/png2swf.1 | 2 +- src/png2swf.c | 9 ++++++--- src/swfdump.c | 3 ++- src/wav2swf.c | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/jpeg2swf.1 b/src/jpeg2swf.1 index e914b5d..cae2b42 100644 --- a/src/jpeg2swf.1 +++ b/src/jpeg2swf.1 @@ -18,7 +18,7 @@ Print short help message and exit Print version info and exit .TP \fB\-o\fR, \fB\-\-output\fR \fIfilename\fR -Explicitly specify output file. (Otherwise, output will go to stdout) +Explicitly specify output file. (Otherwise, output will go to stdout / output.swf) .TP \fB\-q\fR, \fB\-\-quality\fR \fIquality\fR Set JPEG compression quality (1-100) diff --git a/src/png2swf.1 b/src/png2swf.1 index 39706bf..9ade392 100644 --- a/src/png2swf.1 +++ b/src/png2swf.1 @@ -24,7 +24,7 @@ Force movie width to \fIscale\fR (default: autodetect) Force movie height to \fIscale\fR (default: autodetect) .TP \fB\-o\fR, \fB\-\-output\fR \fIfilename\fR -Explicitly specify output file. (Otherwise, output will go to stdout) +Explicitly specify output file. (Otherwise, output will go to stdout / output.swf) .TP \fB\-r\fR, \fB\-\-framerate\fR \fIrate\fR Set movie framerate (100/sec) diff --git a/src/png2swf.c b/src/png2swf.c index d294426..52a442f 100644 --- a/src/png2swf.c +++ b/src/png2swf.c @@ -171,8 +171,8 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id) U8*data; U8*imagedata; unsigned long int imagedatalen; - U8*palette; - int palettelen; + U8*palette = 0; + int palettelen = 0; struct png_header header; int bypp; @@ -249,6 +249,10 @@ TAG *MovieAddFrame(SWF * swf, TAG * t, char *sname, int id) U8*data2 = malloc((header.width+4)*header.height); int i,x,y; int pos=0; + if(!palette) { + fprintf(stderr, "Error: No palette found!\n"); + exit(1); + } /* 24->32 bit conversion */ for(i=0;i Writing block %d", t); block1 = &samples[t*2*blocksize]; - swf_SetSoundStreamBlock(tag, block1, blocksize*2,1); + swf_SetSoundStreamBlock(tag, block1, 1); tag = swf_InsertTag(tag, ST_SHOWFRAME); } -- 1.7.10.4