X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Frfxswf.c;h=e7cb0d845ee038bddf78286db33fba628aa73a03;hb=a6f4bf74f964e101e25f0234ebcb3c3dde175df4;hp=441e19dd74eb4a278a73449e74233f37ca8287e2;hpb=1b376de4a5d3ee2905cf962ecbde7766616d5347;p=swftools.git diff --git a/lib/rfxswf.c b/lib/rfxswf.c index 441e19d..e7cb0d8 100644 --- a/lib/rfxswf.c +++ b/lib/rfxswf.c @@ -65,11 +65,6 @@ U32 swf_GetTagLen(TAG * t) { return t->len; } U8* swf_GetTagLenPtr(TAG * t) { return &(t->data[t->len]); } U32 swf_GetTagPos(TAG * t) { return t->pos; } -// Basic Data Access Functions - -#define swf_ResetReadBits(tag) if (tag->readBit) { tag->pos++; tag->readBit = 0; } -#define swf_ResetWriteBits(tag) if (tag->writeBit) { tag->writeBit = 0; } - // for future purpose: avoid high level lib functions to change tagpos/bitpos #define swf_SaveTagPos(tag) @@ -865,7 +860,7 @@ int swf_WriteTag2(struct writer_t*writer, TAG * t) len = (t->id==ST_DEFINESPRITE)?swf_DefineSprite_GetRealSize(t):t->len; - short_tag = len<0x3f; + short_tag = len<0x3f&&(t->id!=ST_DEFINEBITSLOSSLESS&&t->id!=ST_DEFINEBITSLOSSLESS2); if (writer) { if (short_tag) @@ -1042,7 +1037,7 @@ void swf_FoldSprite(TAG * t) do { - if(t->len<0x3f) { + if(t->len<0x3f&&t->id!=ST_DEFINEBITSLOSSLESS&&t->id!=ST_DEFINEBITSLOSSLESS2) { swf_SetU16(sprtag,t->len|(t->id<<6)); } else { swf_SetU16(sprtag,0x3f|(t->id<<6));