summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-05-30 20:54:52 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-05-31 02:22:10 +0200
commitf67f2681da5fe6a1a97674c6855e670fd089c34d (patch)
tree2f601b7796194282b9229bc03212bfb9c7689c0e /libavcodec
parent20a2d5ec11da1017d5c1f389cb1e6ff2f661a891 (diff)
jpeg2000deci/j2kdec: fix sizeof types
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/j2kdec.c8
-rw-r--r--libavcodec/jpeg2000dec.c4
2 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/j2kdec.c b/libavcodec/j2kdec.c
index 66b427883c..94341e19bc 100644
--- a/libavcodec/j2kdec.c
+++ b/libavcodec/j2kdec.c
@@ -792,11 +792,11 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
int bpass_csty_symbol = JPEG2000_CBLK_BYPASS & codsty->cblk_style;
int vert_causal_ctx_csty_symbol = JPEG2000_CBLK_VSC & codsty->cblk_style;
- for (y = 0; y < height+2; y++)
- memset(t1->flags[y], 0, (width + 2)*sizeof(int));
-
for (y = 0; y < height; y++)
- memset(t1->data[y], 0, width*sizeof(int));
+ memset(t1->data[y], 0, width * sizeof(**t1->data));
+
+ for (y = 0; y < height+2; y++)
+ memset(t1->flags[y], 0, (width + 2)*sizeof(**t1->flags));
cblk->data[cblk->length] = 0xff;
cblk->data[cblk->length+1] = 0xff;
diff --git a/libavcodec/jpeg2000dec.c b/libavcodec/jpeg2000dec.c
index a276a0922f..bb8b0cc803 100644
--- a/libavcodec/jpeg2000dec.c
+++ b/libavcodec/jpeg2000dec.c
@@ -876,13 +876,13 @@ static int decode_cblk(Jpeg2000DecoderContext *s, Jpeg2000CodingStyle *codsty,
int passno = cblk->npasses, pass_t = 2, bpno = cblk->nonzerobits - 1, y;
for (y = 0; y < height; y++)
- memset(t1->data[y], 0, width * sizeof(width));
+ memset(t1->data[y], 0, width * sizeof(**t1->data));
/* If code-block contains no compressed data: nothing to do. */
if (!cblk->length)
return 0;
for (y = 0; y < height + 2; y++)
- memset(t1->flags[y], 0, (width + 2) * sizeof(width));
+ memset(t1->flags[y], 0, (width + 2) * sizeof(**t1->flags));
cblk->data[cblk->length] = 0xff;
cblk->data[cblk->length + 1] = 0xff;