diff options
author | Even Rouault <even.rouault@spatialys.com> | 2021-04-14 21:24:16 +0200 |
---|---|---|
committer | Even Rouault <even.rouault@spatialys.com> | 2021-04-14 21:24:19 +0200 |
commit | 0e34bb284f5c4d41a1dc428e4684c21dd216e41f (patch) | |
tree | 888c2ea8e6e2b8878a9e45cc35a12ccb10e3c8c9 /libtiff/tif_lerc.c | |
parent | bdb804725902a3da981c0bcf4c8c91c29bab01d1 (diff) | |
download | libtiff-git-0e34bb284f5c4d41a1dc428e4684c21dd216e41f.tar.gz |
tif_lerc.c: cope with API breakage in liblerc master
Diffstat (limited to 'libtiff/tif_lerc.c')
-rw-r--r-- | libtiff/tif_lerc.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libtiff/tif_lerc.c b/libtiff/tif_lerc.c index 3cecde82..a4aeb4a1 100644 --- a/libtiff/tif_lerc.c +++ b/libtiff/tif_lerc.c @@ -47,6 +47,10 @@ #define LSTATE_INIT_DECODE 0x01 #define LSTATE_INIT_ENCODE 0x02 +#ifndef LERC_AT_LEAST_VERSION +#define LERC_AT_LEAST_VERSION(maj,min,patch) 0 +#endif + /* * State block for each open TIFF file using LERC compression/decompression. */ @@ -500,6 +504,9 @@ LERCPreDecode(TIFF* tif, uint16_t s) lerc_ret = lerc_decode( lerc_data, lerc_data_size, +#if LERC_AT_LEAST_VERSION(3,0,0) + use_mask ? 1 : 0, +#endif use_mask ? sp->mask_buffer : NULL, ndims, sp->segment_width, @@ -852,6 +859,9 @@ LERCPostEncode(TIFF* tif) sp->segment_width, sp->segment_height, 1, +#if LERC_AT_LEAST_VERSION(3,0,0) + use_mask ? 1 : 0, +#endif use_mask ? sp->mask_buffer : NULL, sp->maxzerror, sp->compressed_buffer, |