aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/shorten.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-01-12 23:27:18 +0100
committerMichael Niedermayer <michaelni@gmx.at>2015-01-12 23:46:50 +0100
commitfbe8672e158a640291c964eef51cbb2924af6348 (patch)
tree57cd00f33ab31788628ee1a69a86ad9e3c1c3662 /libavcodec/shorten.c
parent56c7e1059ab993da68caa3847372f3fb5e010dc4 (diff)
downloadffmpeg-fbe8672e158a640291c964eef51cbb2924af6348.tar.gz
avcodec/shorten: use av_reallocp_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/shorten.c')
-rw-r--r--libavcodec/shorten.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavcodec/shorten.c b/libavcodec/shorten.c
index 4c9cc0636c..deae0fa1ce 100644
--- a/libavcodec/shorten.c
+++ b/libavcodec/shorten.c
@@ -136,12 +136,12 @@ static int allocate_buffers(ShortenContext *s)
return AVERROR_INVALIDDATA;
}
- if ((err = av_reallocp(&s->offset[chan],
- sizeof(int32_t) *
+ if ((err = av_reallocp_array(&s->offset[chan],
+ sizeof(int32_t),
FFMAX(1, s->nmean))) < 0)
return err;
- if ((err = av_reallocp(&s->decoded_base[chan], (s->blocksize + s->nwrap) *
+ if ((err = av_reallocp_array(&s->decoded_base[chan], (s->blocksize + s->nwrap),
sizeof(s->decoded_base[0][0]))) < 0)
return err;
for (i = 0; i < s->nwrap; i++)
@@ -149,7 +149,7 @@ static int allocate_buffers(ShortenContext *s)
s->decoded[chan] = s->decoded_base[chan] + s->nwrap;
}
- if ((err = av_reallocp(&s->coeffs, s->nwrap * sizeof(*s->coeffs))) < 0)
+ if ((err = av_reallocp_array(&s->coeffs, s->nwrap, sizeof(*s->coeffs))) < 0)
return err;
return 0;