Cleanup: fix compiler warning with openjpeg 2.5

This commit is contained in:
Brecht Van Lommel 2022-11-08 13:04:08 +01:00
parent 09faf8a449
commit 32f58c0a92
1 changed files with 3 additions and 0 deletions

View File

@ -885,7 +885,10 @@ static opj_image_t *ibuftoimage(ImBuf *ibuf, opj_cparameters_t *parameters)
memset(&cmptparm, 0, sizeof(opj_image_cmptparm_t[4]));
for (i = 0; i < numcomps; i++) {
cmptparm[i].prec = prec;
/* Deprecated in openjpeg 2.5. */
#if (OPJ_VERSION_MAJOR < 2) || (OPJ_VERSION_MAJOR == 2 && OPJ_VERSION_MINOR < 5)
cmptparm[i].bpp = prec;
#endif
cmptparm[i].sgnd = 0;
cmptparm[i].dx = subsampling_dx;
cmptparm[i].dy = subsampling_dy;