l_old_poc_nb = l_tcp->POC ? l_tcp->numpocs + 1 : 0;
l_current_poc_nb += l_old_poc_nb;
- if (l_current_poc_nb >= 32) {
+ if (l_current_poc_nb >= J2K_MAX_POCS) {
opj_event_msg(p_manager, EVT_ERROR, "Too many POCs %d\n", l_current_poc_nb);
return OPJ_FALSE;
}
- assert(l_current_poc_nb < 32);
/* now poc is in use.*/
l_tcp->POC = 1;
#endif /* USE_JPSEC */
/* <<UniPG */
+#define J2K_MAX_POCS 32 /**< Maximum number of POCs */
+
/* ----------------------------------------------------------------------- */
/**
/** number of progression order changes */
OPJ_UINT32 numpocs;
/** progression order changes */
- opj_poc_t pocs[32];
+ opj_poc_t pocs[J2K_MAX_POCS];
/** number of ppt markers (reserved size) */
OPJ_UINT32 ppt_markers_count;