summaryrefslogtreecommitdiff
path: root/fitz/filt_jpxd.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2011-11-14 18:22:13 +0000
committerRobin Watts <robin.watts@artifex.com>2011-11-15 15:20:54 +0000
commit9c0a49060475b2dea1e4c2668bebd1d566113a7b (patch)
tree49e45a691cf105f4266d5c6b7242a4a3256c1200 /fitz/filt_jpxd.c
parent60c0544742931da63db623ad7a79ba3758704cc1 (diff)
parentfd6def85f22b598d4c278e76138ab7dccbb84c36 (diff)
downloadmupdf-9c0a49060475b2dea1e4c2668bebd1d566113a7b.tar.xz
Merge branch 'master' into context
Mostly redoing the xps_context to xps_document change and adding contexts to newly written code. Conflicts: apps/pdfapp.c apps/pdfapp.h apps/x11_main.c apps/xpsdraw.c draw/draw_device.c draw/draw_scale.c fitz/base_object.c fitz/fitz.h pdf/mupdf.h pdf/pdf_interpret.c pdf/pdf_outline.c pdf/pdf_page.c xps/muxps.h xps/xps_doc.c xps/xps_xml.c
Diffstat (limited to 'fitz/filt_jpxd.c')
-rw-r--r--fitz/filt_jpxd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fitz/filt_jpxd.c b/fitz/filt_jpxd.c
index 5700a664..64197a08 100644
--- a/fitz/filt_jpxd.c
+++ b/fitz/filt_jpxd.c
@@ -5,17 +5,19 @@
static void fz_opj_error_callback(const char *msg, void *client_data)
{
- fprintf(stderr, "openjpeg error: %s", msg);
+ fz_context *ctx = (fz_context *)client_data;
+ fz_warn(ctx, "openjpeg error: %s", msg);
}
static void fz_opj_warning_callback(const char *msg, void *client_data)
{
- fprintf(stderr, "openjpeg warning: %s", msg);
+ fz_context *ctx = (fz_context *)client_data;
+ fz_warn(ctx, "openjpeg warning: %s", msg);
}
static void fz_opj_info_callback(const char *msg, void *client_data)
{
- /* fprintf(stderr, "openjpeg info: %s", msg); */
+ /* fz_warn("openjpeg info: %s", msg); */
}
fz_pixmap *
@@ -50,6 +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_setup_decoder(info, &params);