X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fswfextract.c;h=a9e60e948e47a54d6bed123df428b5167ee3dc08;hb=b47a5592955b38b9ef6fbf299fcec4dd47cbedb0;hp=fa612fc70fe864616264bb9495bd2b73032f6390;hpb=0c3006e417a705dcacc7dad7083de0e4adb41971;p=swftools.git diff --git a/src/swfextract.c b/src/swfextract.c index fa612fc..a9e60e9 100644 --- a/src/swfextract.c +++ b/src/swfextract.c @@ -12,7 +12,7 @@ #include #include "../lib/rfxswf.h" #include "../lib/args.h" -#include "reloc.h" +#include "../lib/log.h" #ifdef HAVE_ZLIB_H #ifdef HAVE_LIBZ #include "zlib.h" @@ -44,6 +44,7 @@ struct options_t options[] = {"i","id"}, {"j","jpegs"}, {"p","pngs"}, + {"m","mp3"}, {"n","name"}, {"f","frame"}, {"V","version"}, @@ -141,7 +142,8 @@ void args_callback_usage(char*name) #endif printf("\t-m , --mp3\t\t\t Extract main mp3 stream\n"); printf("\t-f , --frame frames\t\t frame numbers to extract\n"); - printf("\t-w , --hollow\t\t\t hollow mode: don't remove empty frames (use with -f)\n"); + printf("\t-w , --hollow\t\t\t hollow mode: don't remove empty frames\n"); + printf("\t \t\t\t (use with -f)\n"); printf("\t-V , --version\t\t\t Print program version and exit\n"); } int args_callback_command(char*name,char*val) @@ -175,7 +177,7 @@ void idcallback(void*data) void enumerateIDs(TAG*tag, void(*callback)(void*)) { - U8*data; +/* U8*data; int len = tag->len; if(tag->len>=64) { len += 6; @@ -193,6 +195,13 @@ void enumerateIDs(TAG*tag, void(*callback)(void*)) memcpy(&data[2], tag->data, tag->len); } map_ids_mem(data, len, callback); + */ + int num = swf_GetNumUsedIDs(tag); + int *ptr = malloc(sizeof(int)*num); + int t; + swf_GetUsedIDs(tag, ptr); + for(t=0;tdata[ptr[t]]); } void extractTag(SWF*swf, char*filename)