Skip to content

Commit

Permalink
changed ERROR->WARNING for log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
chafey committed Oct 9, 2021
1 parent e984e13 commit 746bd45
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 1 addition & 2 deletions src/lib/openjp2/j2k.c
Original file line number Diff line number Diff line change
Expand Up @@ -4906,9 +4906,8 @@ static OPJ_BOOL opj_j2k_read_sod(opj_j2k_t *p_j2k,
/* Check enough bytes left in stream before allocation */
if ((OPJ_OFF_T)p_j2k->m_specific_param.m_decoder.m_sot_length >
opj_stream_get_number_byte_left(p_stream)) {
opj_event_msg(p_manager, EVT_ERROR,
opj_event_msg(p_manager, EVT_WARNING,
"Tile part length size inconsistent with stream length\n");
//return OPJ_FALSE;
}
if (p_j2k->m_specific_param.m_decoder.m_sot_length >
UINT_MAX - OPJ_COMMON_CBLK_DATA_EXTRA) {
Expand Down
5 changes: 1 addition & 4 deletions src/lib/openjp2/t2.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,13 +1397,10 @@ static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2,
(OPJ_SIZE_T)l_current_data) ||
(l_current_data + l_seg->newlen > p_src_data + p_max_length) ||
(partial_buffer)) {
opj_event_msg(p_manager, EVT_ERROR,
opj_event_msg(p_manager, EVT_WARNING,
"read: segment too long (%d) with max (%d) for codeblock %d (p=%d, b=%d, r=%d, c=%d)\n",
l_seg->newlen, p_max_length, cblkno, p_pi->precno, bandno, p_pi->resno,
p_pi->compno);
// NOTE - originall we would return OPJ_FALSE here when we encountered partial bitstream
//return OPJ_FALSE;

// skip this codeblock since it is a partial read
partial_buffer = 1;
l_cblk->numchunks = 0;
Expand Down

0 comments on commit 746bd45

Please sign in to comment.