Skip to content

Commit

Permalink
#254 Add build option to disable the fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mayeut committed Jul 3, 2015
1 parent 4e0de64 commit c999b6c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lib/openjp2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ if(BUILD_JPIP)
)
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
if(WIN32)
if(BUILD_SHARED_LIBS)
Expand Down
4 changes: 4 additions & 0 deletions src/lib/openjp2/j2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -8602,6 +8602,10 @@ opj_j2k_t* opj_j2k_create_decompress(void)
l_j2k->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));
if (!l_j2k->m_specific_param.m_decoder.m_default_tcp) {
opj_j2k_destroy(l_j2k);
Expand Down

0 comments on commit c999b6c

Please sign in to comment.