[trunk] Changed error to warning when no EOC found in codestream (fixes

issue 366)
This commit is contained in:
Antonin Descampe 2014-07-14 07:42:50 +00:00
parent 0a1a29a7fe
commit 2c810567dd
1 changed files with 3 additions and 3 deletions

View File

@ -7784,12 +7784,12 @@ OPJ_BOOL opj_j2k_decode_tile ( opj_j2k_t * p_j2k,
} }
else if (l_current_marker != J2K_MS_SOT) else if (l_current_marker != J2K_MS_SOT)
{ {
opj_event_msg(p_manager, EVT_ERROR, "Stream too short, expected SOT\n");
if(opj_stream_get_number_byte_left(p_stream) == 0) { if(opj_stream_get_number_byte_left(p_stream) == 0) {
p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC; p_j2k->m_specific_param.m_decoder.m_state = J2K_STATE_NEOC;
opj_event_msg(p_manager, EVT_WARNING, "Stream does not end with EOC\n");
return OPJ_TRUE; return OPJ_TRUE;
} }
opj_event_msg(p_manager, EVT_ERROR, "Stream too short, expected SOT\n");
return OPJ_FALSE; return OPJ_FALSE;
} }
} }