summaryrefslogtreecommitdiff
path: root/libopenjpeg
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2011-05-16 19:39:07 +0000
committerAntonin Descampe <antonin@gmail.com>2011-05-16 19:39:07 +0000
commit0c9f6a3ac9ede04eb6faf96b7d7a9586c551a9c2 (patch)
treea6ed9e161384a3022f48a45a41a59f98ccebda95 /libopenjpeg
parent18cb325a8edf84ee35c1734f1c8b0c90e4fad29a (diff)
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
Diffstat (limited to 'libopenjpeg')
-rw-r--r--libopenjpeg/t2.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c
index 48463c9c..4af8eb84 100644
--- a/libopenjpeg/t2.c
+++ b/libopenjpeg/t2.c
@@ -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 */