From e917802316a9d409ae4c1d19c690e639d281cb93 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Fri, 2 Mar 2012 14:52:18 +0000 Subject: [PATCH] [trunk] merge r1323 from branch 1.5 over to trunk --- libopenjpeg/jpwl/jpwl.c | 4 ++-- libopenjpeg/tcd.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libopenjpeg/jpwl/jpwl.c b/libopenjpeg/jpwl/jpwl.c index b3e191a2..33577189 100644 --- a/libopenjpeg/jpwl/jpwl.c +++ b/libopenjpeg/jpwl/jpwl.c @@ -168,8 +168,8 @@ void j2k_add_marker(opj_codestream_info_t *cstr_info, unsigned short int type, i /* expand the list? */ if ((cstr_info->marknum + 1) > cstr_info->maxmarknum) { - cstr_info->maxmarknum = 100 + (int) ((float) cstr_info->maxmarknum * 1.0F); - cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum); + cstr_info->maxmarknum += 100; + cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum * sizeof(opj_marker_info_t)); } /* add the marker */ diff --git a/libopenjpeg/tcd.c b/libopenjpeg/tcd.c index b2ffa236..8bd190ac 100644 --- a/libopenjpeg/tcd.c +++ b/libopenjpeg/tcd.c @@ -1414,7 +1414,7 @@ opj_bool tcd_decode_tile(opj_tcd_t *tcd, unsigned char *src, int len, int tileno } else { cstr_info->tile[tileno].pdx[resno] = 15; - cstr_info->tile[tileno].pdx[resno] = 15; + cstr_info->tile[tileno].pdy[resno] = 15; } } } -- 2.40.0