summaryrefslogtreecommitdiff
path: root/wrapping/java/openjp2/org_openJpeg_OpenJPEGJavaDecoder.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2016-01-08 19:38:45 +0100
committerEven Rouault <even.rouault@spatialys.com>2016-01-08 19:38:45 +0100
commit87c0d7dc1eee2adf1aa7ae31bdfac078bb114c01 (patch)
treeb2381360e5c67ba10bf1b0afcf801988a4def833 /wrapping/java/openjp2/org_openJpeg_OpenJPEGJavaDecoder.h
parent0dd44e7dba540e69114a24c81e9190786ed32fed (diff)
[git/2.1 regression] Fix opj_write_tile() failure when numresolutions=1
When trying the GDAL OpenJPEG driver against openjpeg current master HEAD, I get failures when trying to create .jp2 files. The driver uses opj_write_tile() and in some tests numresolutions = 1. In openjp2/dwt.c:410, l_data_size = opj_dwt_max_resolution( tilec->resolutions,tilec->numresolutions) * (OPJ_UINT32)sizeof(OPJ_INT32); is called and returns l_data_size = 0. Now in git opj_malloc() has a special case for 0 to return a NULL pointer whereas previously it relied on system malloc(), which in my case didn't return NULL. So only test the pointer value if l_data_size != 0. This makes the GDAL autotest suite to pass again.
Diffstat (limited to 'wrapping/java/openjp2/org_openJpeg_OpenJPEGJavaDecoder.h')
0 files changed, 0 insertions, 0 deletions