uclouvain/openjpeg#254 Add build option to disable the fix

This commit is contained in:
mayeut 2015-07-04 00:04:55 +02:00
parent 4e0de649bd
commit c999b6c0f0
2 changed files with 9 additions and 0 deletions

View File

@ -41,6 +41,11 @@ if(BUILD_JPIP)
) )
endif() endif()
option(OPJ_DISABLE_TPSOT_FIX "Disable TPsot==TNsot fix. See https://github.com/uclouvain/openjpeg/issues/254." OFF)
if(OPJ_DISABLE_TPSOT_FIX)
add_definitions(-DOPJ_DISABLE_TPSOT_FIX)
endif()
# Build the library # Build the library
if(WIN32) if(WIN32)
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)

View File

@ -8602,6 +8602,10 @@ opj_j2k_t* opj_j2k_create_decompress(void)
l_j2k->m_is_decoder = 1; l_j2k->m_is_decoder = 1;
l_j2k->m_cp.m_is_decoder = 1; l_j2k->m_cp.m_is_decoder = 1;
#ifdef OPJ_DISABLE_TPSOT_FIX
l_j2k->m_specific_param.m_decoder.m_nb_tile_parts_correction_checked = 1;
#endif
l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_t*) opj_calloc(1,sizeof(opj_tcp_t)); l_j2k->m_specific_param.m_decoder.m_default_tcp = (opj_tcp_t*) opj_calloc(1,sizeof(opj_tcp_t));
if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) { if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) {
opj_j2k_destroy(l_j2k); opj_j2k_destroy(l_j2k);