summaryrefslogtreecommitdiff
path: root/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2012-01-13 15:53:12 +0000
committerRobin Watts <robin.watts@artifex.com>2012-01-13 15:53:12 +0000
commit5e89e9cc3918b9e7e98045f220320ae044dbdc67 (patch)
tree7c83d3af8ce129c8816c3d092c8c43d820efc7c1 /fitz
parentf0d427993c1b9b40f1bc0b77ed9c0433099f2a5d (diff)
downloadmupdf-5e89e9cc3918b9e7e98045f220320ae044dbdc67.tar.xz
Ensure that client_data pointer for jpx decodes is ctx.
The call to opj_set_event_mgr would overwrite client_data=ctx with client_data=stderr - not what was wanted. Thanks to Zeniko for this.
Diffstat (limited to 'fitz')
-rw-r--r--fitz/filt_jpxd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fitz/filt_jpxd.c b/fitz/filt_jpxd.c
index 3075847b..98e88243 100644
--- a/fitz/filt_jpxd.c
+++ b/fitz/filt_jpxd.c
@@ -52,8 +52,7 @@ fz_load_jpx_image(fz_context *ctx, unsigned char *data, int size, fz_colorspace
opj_set_default_decoder_parameters(&params);
info = opj_create_decompress(format);
- info->client_data = (void *)ctx;
- opj_set_event_mgr((opj_common_ptr)info, &evtmgr, stderr);
+ opj_set_event_mgr((opj_common_ptr)info, &evtmgr, ctx);
opj_setup_decoder(info, &params);
cio = opj_cio_open((opj_common_ptr)info, data, size);