X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;ds=sidebyside;f=lib%2Frfxswf.c;h=3a8a3ce25b4f4a22a80aed9c54cccc808935f470;hb=1429055118de769a62d7eafc00504ebb25c70c16;hp=ed9492712477f3587937c4ed4306ca1767f0cb16;hpb=8526dcf3a698c688e2cc4430ae106b5ecf70677f;p=swftools.git diff --git a/lib/rfxswf.c b/lib/rfxswf.c index ed94927..3a8a3ce 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -54,8 +54,8 @@ void* rfx_alloc(int size) { void*ptr; if(size == 0) { - *(int*)0 = 0xdead; - fprintf(stderr, "Warning: Zero alloc\n"); + //*(int*)0 = 0xdead; + //fprintf(stderr, "Warning: Zero alloc\n"); return 0; } @@ -71,8 +71,8 @@ void* rfx_realloc(void*data, int size) { void*ptr; if(size == 0) { - *(int*)0 = 0xdead; - fprintf(stderr, "Warning: Zero realloc\n"); + //*(int*)0 = 0xdead; + //fprintf(stderr, "Warning: Zero realloc\n"); rfx_free(data); return 0; } @@ -93,8 +93,8 @@ void* rfx_calloc(int size) { void*ptr; if(size == 0) { - *(int*)0 = 0xdead; - fprintf(stderr, "Warning: Zero alloc\n"); + //*(int*)0 = 0xdead; + //fprintf(stderr, "Warning: Zero alloc\n"); return 0; } #ifdef HAVE_CALLOC @@ -1310,6 +1310,10 @@ int swf_WriteSWF2(struct writer_t*writer, SWF * swf) // Writes SWF to file, len += swf_WriteTag(-1,t); if(t->id == ST_DEFINESPRITE && !swf_IsFolded(t)) inSprite++; else if(t->id == ST_END && inSprite) inSprite--; + else if(t->id == ST_END && !inSprite) { + if(t->prev && t->prev->id!=ST_SHOWFRAME) + frameCount++; + } else if(t->id == ST_SHOWFRAME && !inSprite) frameCount++; t = swf_NextTag(t); }