From 5e89e9cc3918b9e7e98045f220320ae044dbdc67 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 13 Jan 2012 15:53:12 +0000 Subject: 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. --- fitz/filt_jpxd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'fitz') 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(¶ms); 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, ¶ms); cio = opj_cio_open((opj_common_ptr)info, data, size); -- cgit v1.2.3