gdal/gdal_jasper.patch
DistroBaker 1344cff5a0 Merged update from upstream sources
This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/gdal.git#f465375f884288582bdbb8d3512bd1022d27f2ae
2020-10-27 17:37:24 +01:00

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);