X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.c;h=127984c33e035e19f49e3cc082ee5a3b9eea9810;hb=93e78ef02b9918ccfa86f0e4d446e503cbec1fe1;hp=6a8d79d01e9f6548dc01ec3c5fb7977410ace2c1;hpb=994d5705f3ab0c9c3bb57dcd9fa8bb2a5398de2c;p=swftools.git diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 6a8d79d..127984c 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -31,6 +31,9 @@ #endif // HAVE_ZLIB_H #endif // HAVE_LIBZ +#define LAME +#include "lame/lame.h" + #include "./bitio.h" // internal constants @@ -747,6 +750,10 @@ void swf_FoldSprite(TAG * t) fprintf(stderr, "Error: Sprite has no ID!"); return; } + if(t->len>4) { + /* sprite is already folded */ + return; + } t->pos = 0; id = swf_GetU16(t); @@ -838,7 +845,7 @@ int swf_ReadSWF2(struct reader_t*reader, SWF * swf) // Reads SWF to memory (ma t1.next->prev = NULL; } - return 0; + return reader->pos; } int swf_ReadSWF(int handle, SWF * swf)