]> granicus.if.org Git - openjpeg/commitdiff
[trunk] Import patch from sumatrapdf team. Original commit is 5b0c9985e3359aca9b3fcfd...
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 26 Feb 2014 11:13:21 +0000 (11:13 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 26 Feb 2014 11:13:21 +0000 (11:13 +0000)
Update issue 225

src/lib/openjp2/j2k.c

index d94c664fb031dca332a883f71c60937f62c01c3a..3cdbfcefac94528d0b44e41f7544d1bcd637da53 100644 (file)
@@ -4091,7 +4091,7 @@ OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k,
 
                                         if ( l_current_part >= p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps ){
                                                 opj_tp_index_t *new_tp_index;
-                                                p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps += 10;
+                                                p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps = l_current_part + 1;
                                                 new_tp_index = (opj_tp_index_t *) opj_realloc(
                                                                 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].tp_index,
                                                                 p_j2k->cstr_index->tile_index[p_j2k->m_current_tile_number].current_nb_tps * sizeof(opj_tp_index_t));