summaryrefslogtreecommitdiff
path: root/src/lib/openmj2/openjpeg.c
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-08-16 17:38:47 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-08-16 17:39:20 +0200
commit1e387de74273c4dac618df94475556541c1caf3e (patch)
treee86a1ebe47d1f7ab706b9fd1087ca4af5fd006e5 /src/lib/openmj2/openjpeg.c
parentc535531f03369623b9b833ef41952c62257b507e (diff)
Fix build issue of JPWL by adding opj_image_data_alloc() and opj_image_data_free() to src/lib/openmj2 (#994)
Diffstat (limited to 'src/lib/openmj2/openjpeg.c')
-rw-r--r--src/lib/openmj2/openjpeg.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/openmj2/openjpeg.c b/src/lib/openmj2/openjpeg.c
index ae4bf1e4..a0cce5da 100644
--- a/src/lib/openmj2/openjpeg.c
+++ b/src/lib/openmj2/openjpeg.c
@@ -372,3 +372,18 @@ void OPJ_CALLCONV opj_destroy_cstr_info(opj_codestream_info_t *cstr_info)
opj_free(cstr_info->numdecompos);
}
}
+
+void* OPJ_CALLCONV opj_image_data_alloc(size_t size)
+{
+ /* NOTE: this defers from libopenjp2 where we use opj_aligned_malloc */
+ void* ret = opj_malloc(size);
+ /* printf("opj_image_data_alloc %p\n", ret); */
+ return ret;
+}
+
+void OPJ_CALLCONV opj_image_data_free(void* ptr)
+{
+ /* NOTE: this defers from libopenjp2 where we use opj_aligned_free */
+ /* printf("opj_image_data_free %p\n", ptr); */
+ opj_free(ptr);
+}