diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2017-11-30 14:48:34 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2017-11-30 14:48:34 +0100 |
| commit | 98cfdd31340509895f3e2a36f667f66bb3cf1ff2 (patch) | |
| tree | a9ab99ac2e01eb06e37dfa7ad3942915425fe8a6 /src/lib | |
| parent | 936910cf7a4d85e341582746126d105a8a044f30 (diff) | |
opj_j2k_read_cod: remove check for 'No more than one COD marker per tile' (fixes #1043)
This check was added per https://github.com/uclouvain/openjpeg/commit/daed8cc9195555e101ab708a501af2dfe6d5e001
to fix https://github.com/uclouvain/openjpeg/issues/476 , but it does not seem
to be necessary with latest master (issue476.jp2 doesn't cause memory issues),
and breaks reading legit files.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/openjp2/j2k.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.c b/src/lib/openjp2/j2k.c index e283884f..6e9cf8ce 100644 --- a/src/lib/openjp2/j2k.c +++ b/src/lib/openjp2/j2k.c @@ -2657,12 +2657,17 @@ static OPJ_BOOL opj_j2k_read_cod(opj_j2k_t *p_j2k, &l_cp->tcps[p_j2k->m_current_tile_number] : p_j2k->m_specific_param.m_decoder.m_default_tcp; +#if 0 + /* This check was added per https://github.com/uclouvain/openjpeg/commit/daed8cc9195555e101ab708a501af2dfe6d5e001 */ + /* but this is no longer necessary to handle issue476.jp2 */ + /* and this actually cause issues on legit files. See https://github.com/uclouvain/openjpeg/issues/1043 */ /* Only one COD per tile */ if (l_tcp->cod) { opj_event_msg(p_manager, EVT_ERROR, "COD marker already read. No more than one COD marker per tile.\n"); return OPJ_FALSE; } +#endif l_tcp->cod = 1; /* Make sure room is sufficient */ |
