aboutsummaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer2015-01-15 23:02:43 +0100
committerMichael Niedermayer2015-01-15 23:02:43 +0100
commit5989a2b24f36e559e1a61310c6b4935bb3dfb589 (patch)
treee84316dcbf084d24f400231a0d203be2d0419da6 /libavcodec
parent71bd6ea0fada69dd562d2e9dc1cd67d07b5a7417 (diff)
avcodec/g722enc: Use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/g722enc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libavcodec/g722enc.c b/libavcodec/g722enc.c
index dac7c87768..17dde9ec80 100644
--- a/libavcodec/g722enc.c
+++ b/libavcodec/g722enc.c
@@ -75,9 +75,9 @@ static av_cold int g722_encode_init(AVCodecContext * avctx)
int max_paths = frontier * FREEZE_INTERVAL;
int i;
for (i = 0; i < 2; i++) {
- c->paths[i] = av_mallocz(max_paths * sizeof(**c->paths));
- c->node_buf[i] = av_mallocz(2 * frontier * sizeof(**c->node_buf));
- c->nodep_buf[i] = av_mallocz(2 * frontier * sizeof(**c->nodep_buf));
+ c->paths[i] = av_mallocz_array(max_paths, sizeof(**c->paths));
+ c->node_buf[i] = av_mallocz_array(frontier, 2 * sizeof(**c->node_buf));
+ c->nodep_buf[i] = av_mallocz_array(frontier, 2 * sizeof(**c->nodep_buf));
if (!c->paths[i] || !c->node_buf[i] || !c->nodep_buf[i]) {
ret = AVERROR(ENOMEM);
goto error;