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/pi.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/pi.c')
| -rw-r--r-- | libopenjpeg/pi.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libopenjpeg/pi.c b/libopenjpeg/pi.c index 45de9031..ac7654c5 100644 --- a/libopenjpeg/pi.c +++ b/libopenjpeg/pi.c @@ -726,7 +726,7 @@ bool pi_next(opj_pi_iterator_t * pi) { return false; } -void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){ +bool pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino,int tpnum, int tppos, J2K_T2_MODE t2_mode,int cur_totnum_tp){ char prog[4]; int i; int incr_top=1,resetX=0; @@ -746,7 +746,9 @@ void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino, case RLCP: strncpy(prog, "RLCP",4); break; case RPCL: strncpy(prog, "RPCL",4); - break; + break; + case PROG_UNKNOWN: + return true; } if(!(cp->tp_on && ((!cp->cinema && (t2_mode == FINAL_PASS)) || cp->cinema))){ @@ -956,5 +958,6 @@ void pi_create_encode( opj_pi_iterator_t *pi, opj_cp_t *cp,int tileno, int pino, } } } + return false; } |
