X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Frecord.c;h=a999b8d2fb23b96edcd76fec346948dda1d74240;hb=81b35c45757179aa09c540e82fb810df8bb9e1cc;hp=964792316519a41c00a4b0bb67bacd269fbd0c45;hpb=b7685336c293cd0489a5891c598e1ec21ef11f25;p=swftools.git diff --git a/lib/devices/record.c b/lib/devices/record.c index 9647923..a999b8d 100644 --- a/lib/devices/record.c +++ b/lib/devices/record.c @@ -489,6 +489,7 @@ static void replay(struct _gfxdevice*recorddev, gfxdevice_t*device, void*data, i device->fillbitmap(device, line, &img, &matrix, cxform); if(cxform) free(cxform); + free(img.data);img.data=0; break; } case OP_FILLGRADIENT: { @@ -539,6 +540,7 @@ static void replay(struct _gfxdevice*recorddev, gfxdevice_t*device, void*data, i } } } + r->dealloc(r); gfxfontlist_free(fontlist, 1); } void gfxresult_record_replay(gfxresult_t*result, gfxdevice_t*device) @@ -584,6 +586,31 @@ static void record_result_destroy(gfxresult_t*r) free(r); } +static unsigned char printable(unsigned char a) +{ + if(a<32 || a==127) return '.'; + else return a; +} + +static void hexdumpMem(unsigned char*data, int len) +{ + int t; + char ascii[32]; + for(t=0;tinternal; @@ -601,6 +628,8 @@ static gfxresult_t* record_finish(struct _gfxdevice*dev) msg(" record: END\n"); writer_writeU8(&i->w, OP_END); + + gfxfontlist_free(i->fontlist, 0); internal_result_t*ir = (internal_result_t*)rfx_calloc(sizeof(gfxresult_t)); ir->data = writer_growmemwrite_getmem(&i->w);