rev 386 - trunk
[email protected] Mon, 3 Jan 2005 21:17:39 -0800 (PST)
| Newsgroups | gmane.comp.printing.ghostscript.jbig2dec.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: giles
Date: 2005-01-03 21:17:39 -0800 (Mon, 03 Jan 2005)
New Revision: 386
Modified:
trunk/jbig2_symbol_dict.c
Log:
Also correctly free the integer arith coding contexts in symbol=20
dictionary decode.
Modified: trunk/jbig2_symbol_dict.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/jbig2_symbol_dict.c 2005-01-04 05:07:45 UTC (rev 385)
+++ trunk/jbig2_symbol_dict.c 2005-01-04 05:17:39 UTC (rev 386)
@@ -243,9 +243,9 @@
int SBSYMCODELEN;
for (SBSYMCODELEN =3D 0; (1 << SBSYMCODELEN) < tmp; SBSYMCODELEN++);
IAID =3D jbig2_arith_iaid_ctx_new(ctx, SBSYMCODELEN);
+ IARDX =3D jbig2_arith_int_ctx_new(ctx);
+ IARDY =3D jbig2_arith_int_ctx_new(ctx);
}
- IARDX =3D jbig2_arith_int_ctx_new(ctx);
- IARDY =3D jbig2_arith_int_ctx_new(ctx);
} else {
jbig2_error(ctx, JBIG2_SEVERITY_WARNING, segment->number,
"NYI: huffman coded symbol dictionary");
@@ -487,6 +487,15 @@
jbig2_sd_release(ctx, SDNEWSYMS);
=20
if (!params->SDHUFF) {
+ jbig2_arith_int_ctx_free(ctx, IADH);
+ jbig2_arith_int_ctx_free(ctx, IADW);
+ jbig2_arith_int_ctx_free(ctx, IAEX);
+ jbig2_arith_int_ctx_free(ctx, IAAI);
+ if (params->SDREFAGG) {
+ jbig2_arith_iaid_ctx_free(ctx, IAID);
+ jbig2_arith_int_ctx_free(ctx, IARDX);
+ jbig2_arith_int_ctx_free(ctx, IARDY);
+ }
jbig2_free(ctx->allocator, as); =20
jbig2_word_stream_buf_free(ctx, ws);
}