Correct the wrong output management of opj_stream_read_seek function (thanks to EvenR)
This commit is contained in:
parent
ec19c32b63
commit
28a0028762
|
@ -880,7 +880,7 @@ OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, op
|
|||
* @param p_stream the stream to skip data from.
|
||||
* @param p_size the number of bytes to skip.
|
||||
* @param p_event_mgr the user event manager to be notified of special events.
|
||||
* @return the number of bytes skipped, or -1 if an error occured.
|
||||
* @return OPJ_TRUE if success, or OPJ_FALSE if an error occured.
|
||||
*/
|
||||
opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
|
||||
{
|
||||
|
|
|
@ -371,7 +371,7 @@ OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
|
|||
* @param p_stream the stream to skip data from.
|
||||
* @param p_size the number of bytes to skip.
|
||||
* @param p_event_mgr the user event manager to be notified of special events.
|
||||
* @return the number of bytes skipped, or -1 if an error occured.
|
||||
* @return OPJ_TRUE if success, or OPJ_FALSE if an error occured.
|
||||
*/
|
||||
opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
|
||||
|
||||
|
|
|
@ -10571,13 +10571,13 @@ static opj_bool opj_j2k_decode_one_tile ( opj_j2k_v2_t *p_j2k,
|
|||
if ( ! p_j2k->cstr_index->tile_index[l_tile_no_to_dec].nb_tps) {
|
||||
/* the index for this tile has not been built,
|
||||
* so move to the last SOT read */
|
||||
if ( opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager) ){
|
||||
if ( !(opj_stream_read_seek(p_stream, p_j2k->m_specific_param.m_decoder.m_last_sot_read_pos+2, p_manager)) ){
|
||||
opj_event_msg_v2(p_manager, EVT_ERROR, "Problem with seek function\n");
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
}
|
||||
else{
|
||||
if (opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) {
|
||||
if ( !(opj_stream_read_seek(p_stream, p_j2k->cstr_index->tile_index[l_tile_no_to_dec].tp_index[0].start_pos+2, p_manager)) ) {
|
||||
opj_event_msg_v2(p_manager, EVT_ERROR, "Problem with seek function\n");
|
||||
return OPJ_FALSE;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue