]> granicus.if.org Git - openjpeg/commitdiff
BUG: 4 Apply patch from stefan.
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 11 Jan 2012 19:14:50 +0000 (19:14 +0000)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Wed, 11 Jan 2012 19:14:50 +0000 (19:14 +0000)
libopenjpeg/jpwl/jpwl.c
libopenjpeg/tcd.c

index a910ea780938c1a7afa713a333c038b7f646e7ca..4247f750640f8d2921f982e086423421993cd6d0 100644 (file)
@@ -168,8 +168,8 @@ void j2k_add_marker(opj_codestream_info_t *cstr_info, unsigned short int type, i
 \r
        /* expand the list? */\r
        if ((cstr_info->marknum + 1) > cstr_info->maxmarknum) {\r
-               cstr_info->maxmarknum = 100 + (int) ((float) cstr_info->maxmarknum * 1.0F);\r
-               cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum);\r
+               cstr_info->maxmarknum += 100;\r
+               cstr_info->marker = (opj_marker_info_t*)opj_realloc(cstr_info->marker, cstr_info->maxmarknum * sizeof(opj_marker_info_t));\r
        }\r
 \r
        /* add the marker */\r
index 7eabce5595c949139d09bdcc941c191b1c40529d..18cdbc786bca6318246f9c556c4b77f82b6a9fff 100644 (file)
@@ -1352,7 +1352,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;
                                }
                        }
                }