diff options
| author | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2007-12-21 10:19:01 +0000 |
|---|---|---|
| committer | Francois-Olivier Devaux <fodevaux@users.noreply.github.com> | 2007-12-21 10:19:01 +0000 |
| commit | 287fb0b8fd3b8e57a63c82d9950340e75a09fe11 (patch) | |
| tree | 371bd898d185af5a84680a1c9103f5bff4253107 /libopenjpeg/t2.c | |
| parent | 847b082b64bb975555eac8876e28d2f15a9b56ad (diff) | |
Bug fixed by David Bruken. Fixed memory allocation issue in opj_malloc.h.
Possible errors in pi_create_encode handled
Diffstat (limited to 'libopenjpeg/t2.c')
| -rw-r--r-- | libopenjpeg/t2.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libopenjpeg/t2.c b/libopenjpeg/t2.c index a841cf0b..be9b42a4 100644 --- a/libopenjpeg/t2.c +++ b/libopenjpeg/t2.c @@ -612,7 +612,10 @@ int t2_encode_packets(opj_t2_t* t2,int tileno, opj_tcd_tile_t *tile, int maxlaye for(poc = 0; poc < pocno ; poc++){ int comp_len = 0; int tpnum = compno; - pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp); + if (pi_create_encode(pi, cp,tileno,poc,tpnum,tppos,t2_mode,cur_totnum_tp)) { + opj_event_msg(t2->cinfo, EVT_ERROR, "Error initializing Packet Iterator\n"); + return -999; + } while (pi_next(&pi[poc])) { if (pi[poc].layno < maxlayers) { e = t2_encode_packet(tile, &cp->tcps[tileno], &pi[poc], c, dest + len - c, cstr_info, tileno); |
