minor fixes.
authorkramm <kramm>
Mon, 20 May 2002 12:05:17 +0000 (12:05 +0000)
committerkramm <kramm>
Mon, 20 May 2002 12:05:17 +0000 (12:05 +0000)
src/jpeg2swf.1
src/png2swf.1
src/png2swf.c
src/swfdump.c
src/wav2swf.c

index e914b5d..cae2b42 100644 (file)
@@ -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)
index 39706bf..9ade392 100644 (file)
@@ -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)
index d294426..52a442f 100644 (file)
@@ -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<palettelen;i++) {
            rgba[i].r = palette[i*3+0];
@@ -464,7 +468,6 @@ void args_callback_usage(char *name)
     printf("-Y pixel              (height) Force movie height to pixel (default: autodetect)\n");
     printf("-v level              (verbose) Set verbose level (0=quiet, 1=default, 2=debug)\n");
     printf("-V                    (version) Print version information and exit\n");
-    printf("The following options can be set independently for each image: -q -s\n");
 }
 
 
index c750095..4902873 100644 (file)
@@ -402,7 +402,8 @@ void dumperror(const char* format, ...)
     vsprintf(buf, format, arglist);
     va_end(arglist);
 
-    printf("==== Error: %s ====\n", buf);
+    if(!html && !xy)
+       printf("==== Error: %s ====\n", buf);
 }
 
 int main (int argc,char ** argv)
index 8dfd0db..4734186 100644 (file)
@@ -121,7 +121,7 @@ int main (int argc,char ** argv)
       tag = swf_InsertTag(tag, ST_SOUNDSTREAMBLOCK);
       logf("<notice> 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);
   }