fixed another bug related to the number of packets in a tile-part, not correctly taken into account when generating an index file during decoding

This commit is contained in:
Antonin Descampe 2011-05-16 19:39:07 +00:00
parent 18cb325a8e
commit 0c9f6a3ac9
2 changed files with 3 additions and 0 deletions

View File

@ -6,6 +6,7 @@ What's New for OpenJPEG
+ : added
May 16, 2011
* [antonin] fixed another bug related to the number of packets in a tile-part, not correctly taken into acccount when generating an index file during decoding.
* [antonin] fixed part of issue 69, when tile-part index is inconsistent with the total number of tile-parts
May 12, 2011

View File

@ -730,6 +730,7 @@ int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj
info_PK->start_pos = info_TL->end_header + 1;
} else if (info_TL->packet[cstr_info->packno-1].end_pos >= (int)cstr_info->tile[tileno].tp[curtp].tp_end_pos){ // New tile part
info_TL->tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; // Number of packets in previous tile-part
info_TL->tp[curtp].tp_start_pack = tp_start_packno;
tp_start_packno = cstr_info->packno;
curtp++;
info_PK->start_pos = cstr_info->tile[tileno].tp[curtp].tp_end_header+1;
@ -753,6 +754,7 @@ int t2_decode_packets(opj_t2_t *t2, unsigned char *src, int len, int tileno, opj
/* INDEX >> */
if(cstr_info) {
cstr_info->tile[tileno].tp[curtp].tp_numpacks = cstr_info->packno - tp_start_packno; // Number of packets in last tile-part
cstr_info->tile[tileno].tp[curtp].tp_start_pack = tp_start_packno;
}
/* << INDEX */