- change types related to size of stream to OPJ_UINT64_T
- change calls to fseek/ftell to LFS-capable OPJ_SEEK/OPJ_TELL
* [mickael] fix error about the way to detect the additional test suite
+* [mickael] fix bug during random access to tile (tile already decoded)
November 29, 2011
* [mickael] fix error with new way to detect kdu_expand
*/
static void j2k_tcp_destroy (opj_tcp_v2_t *p_tcp);
+/**
+ * Destroys the data inside a tile coding parameter structure.
+ *
+ * @param p_tcp the tile coding parameter which contain data to destroy.
+ */
+static void j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp);
/**
* Destroys a coding parameter structure.
p_tcp->mct_norms = 00;
}
+ j2k_tcp_data_destroy(p_tcp);
+
+}
+
+/**
+ * Destroys the data inside a tile coding parameter structure.
+ *
+ * @param p_tcp the tile coding parameter which contain data to destroy.
+ */
+void j2k_tcp_data_destroy (opj_tcp_v2_t *p_tcp)
+{
if (p_tcp->m_data) {
opj_free(p_tcp->m_data);
- p_tcp->m_data = 00;
+ p_tcp->m_data = NULL;
+ p_tcp->m_data_size = 0;
}
}
-
/**
* Destroys a coding parameter structure.
*
return OPJ_FALSE;
}
- j2k_tcp_destroy(l_tcp);
- p_j2k->m_tcd->tcp = 0;
+ /* To avoid to destroy the tcp which can be useful when we try to decode a tile decoded before (cf j2k_random_tile_access)
+ * we destroy just the data which will be re-read in read_tile_header*/
+ /*j2k_tcp_destroy(l_tcp);
+ p_j2k->m_tcd->tcp = 0;*/
+ j2k_tcp_data_destroy(l_tcp);
p_j2k->m_specific_param.m_decoder.m_can_decode = 0;
p_j2k->m_specific_param.m_decoder.m_state &= (~ (0x0080));// FIXME J2K_DEC_STATE_DATA);