-o support for jpg and png.
[swftools.git] / src / swfdump.c
index 0278ec8..c9f910c 100644 (file)
@@ -104,6 +104,7 @@ int args_callback_option(char*name,char*val)
     }
     else {
         printf("Unknown option: -%s\n", name);
+       exit(1);
     }
 
     return 0;
@@ -116,7 +117,7 @@ void args_callback_usage(char*name)
 {    
     printf("Usage: %s [-at] file.swf\n", name);
     printf("\t-h , --help\t\t Print help and exit\n");
-    printf("\t-e , --html\t\t Create a html embedding the file (simple, but useful)\n");
+    printf("\t-e , --html\t\t Create html output embedding the file (simple, but useful)\n");
     printf("\t-X , --width\t\t Prints out a string of the form \"-X width\"\n");
     printf("\t-Y , --height\t\t Prints out a string of the form \"-Y height\"\n");
     printf("\t-r , --rate\t\t Prints out a string of the form \"-r rate\"\n");
@@ -653,7 +654,23 @@ int main (int argc,char ** argv)
             printf(" frees object %04d", swf_GetPlaceID(tag));
         }
        else if(tag->id == ST_STARTSOUND) {
-           printf(" starts id %04d", swf_GetPlaceID(tag));
+           U8 flags;
+           U16 id;
+           id = swf_GetU16(tag);
+           flags = swf_GetU8(tag);
+           if(flags & 32)
+               printf(" stops sound with id %04d", id);
+           else
+               printf(" starts sound with id %04d", id);
+           if(flags & 16)
+               printf(" (if not already playing)");
+           if(flags & 1)
+               swf_GetU32(tag);
+           if(flags & 2)
+               swf_GetU32(tag);
+           if(flags & 4) {
+               printf(" looping %d times", swf_GetU16(tag));
+           }
        }
        else if(tag->id == ST_FRAMELABEL) {
            int l = strlen(tag->data);