parent
4ac3886d2a
commit
c923519b02
@ -0,0 +1,31 @@
|
|||||||
|
--- a/source/fitz/load-jpx.c
|
||||||
|
+++ b/source/fitz/load-jpx.c
|
||||||
|
@@ -484,13 +484,18 @@
|
||||||
|
/* Without the definition of OPJ_STATIC, compilation fails on windows
|
||||||
|
* due to the use of __stdcall. We believe it is required on some
|
||||||
|
* linux toolchains too. */
|
||||||
|
+
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+extern "C"
|
||||||
|
+{
|
||||||
|
#define OPJ_STATIC
|
||||||
|
#ifndef _MSC_VER
|
||||||
|
#define OPJ_HAVE_STDINT_H
|
||||||
|
#endif
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
-#include <openjpeg.h>
|
||||||
|
-
|
||||||
|
+#include <openjpeg-2.1/openjpeg.h>
|
||||||
|
+
|
||||||
|
/* OpenJPEG does not provide a safe mechanism to intercept
|
||||||
|
* allocations. In the latest version all allocations go
|
||||||
|
* though opj_malloc etc, but no context is passed around.
|
||||||
|
@@ -972,3 +977,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif /* HAVE_LURATECH */
|
||||||
|
+
|
||||||
|
+#ifdef __cplusplus
|
||||||
|
+}
|
||||||
|
+#endif
|
@ -1,13 +0,0 @@
|
|||||||
diff --git a/source/fitz/load-jpx.c b/source/fitz/load-jpx.c
|
|
||||||
index dd7bf9e..3a1c7a8 100644
|
|
||||||
--- a/source/fitz/load-jpx.c
|
|
||||||
+++ b/source/fitz/load-jpx.c
|
|
||||||
@@ -116,7 +116,7 @@ fz_load_jpx(fz_context *ctx, unsigned char *data, int size, fz_colorspace *defcs
|
|
||||||
opj_stream_set_read_function(stream, fz_opj_stream_read);
|
|
||||||
opj_stream_set_skip_function(stream, fz_opj_stream_skip);
|
|
||||||
opj_stream_set_seek_function(stream, fz_opj_stream_seek);
|
|
||||||
- opj_stream_set_user_data(stream, &sb);
|
|
||||||
+ opj_stream_set_user_data(stream, &sb, NULL);
|
|
||||||
/* Set the length to avoid an assert */
|
|
||||||
opj_stream_set_user_data_length(stream, size);
|
|
||||||
|
|
Loading…
Reference in new issue