48 lines
2.3 KiB
Diff
48 lines
2.3 KiB
Diff
diff -rupN --no-dereference gdal-3.1.3-fedora/frmts/jpeg2000/jpeg2000dataset.cpp gdal-3.1.3-fedora-new/frmts/jpeg2000/jpeg2000dataset.cpp
|
|
--- gdal-3.1.3-fedora/frmts/jpeg2000/jpeg2000dataset.cpp 2020-09-01 10:39:25.000000000 +0200
|
|
+++ gdal-3.1.3-fedora-new/frmts/jpeg2000/jpeg2000dataset.cpp 2020-10-16 21:26:32.069883712 +0200
|
|
@@ -513,7 +513,7 @@ int JPEG2000Dataset::DecodeImage()
|
|
for ( iBand = 0; iBand < nBands; iBand++ )
|
|
{
|
|
JPEG2000RasterBand* poBand = (JPEG2000RasterBand*) GetRasterBand(iBand+1);
|
|
- if (poBand->iDepth != jas_image_cmptprec( psImage, iBand ) ||
|
|
+ if (poBand->iDepth != static_cast<int>(jas_image_cmptprec( psImage, iBand )) ||
|
|
poBand->bSignedness != jas_image_cmptsgnd( psImage, iBand ))
|
|
{
|
|
CPLError(CE_Failure, CPLE_AppDefined,
|
|
diff -rupN --no-dereference gdal-3.1.3-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp gdal-3.1.3-fedora-new/frmts/jpeg2000/jpeg2000_vsil_io.cpp
|
|
--- gdal-3.1.3-fedora/frmts/jpeg2000/jpeg2000_vsil_io.cpp 2020-09-01 10:39:25.000000000 +0200
|
|
+++ gdal-3.1.3-fedora-new/frmts/jpeg2000/jpeg2000_vsil_io.cpp 2020-10-16 21:26:32.069883712 +0200
|
|
@@ -94,22 +94,24 @@ typedef struct {
|
|
* File stream object.
|
|
\******************************************************************************/
|
|
|
|
+#if defined(PRIjas_seqent)
|
|
// PRIjas_seqent macro is defined since Jasper 2.0.17
|
|
-
|
|
-#ifndef PRIjas_seqent
|
|
-static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
|
|
-#else
|
|
static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, unsigned cnt)
|
|
+#else
|
|
+static int JPEG2000_VSIL_read(jas_stream_obj_t *obj, char *buf, int cnt)
|
|
#endif
|
|
{
|
|
jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
|
|
return static_cast<int>(VSIFReadL(buf, 1, cnt, fileobj->fp));
|
|
}
|
|
|
|
-#ifndef PRIjas_seqent
|
|
-static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
|
|
-#else
|
|
+#if defined(JAS_INCLUDE_JP2_CODEC)
|
|
+// Jasper 2.0.21
|
|
+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, const char *buf, unsigned int cnt)
|
|
+#elif defined(PRIjas_seqent)
|
|
static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, unsigned int cnt)
|
|
+#else
|
|
+static int JPEG2000_VSIL_write(jas_stream_obj_t *obj, char *buf, int cnt)
|
|
#endif
|
|
{
|
|
jas_stream_VSIFL_t *fileobj = JAS_CAST(jas_stream_VSIFL_t *, obj);
|