summaryrefslogtreecommitdiff
path: root/libavcodec/tta.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-18 15:19:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-18 15:19:09 +0200
commitbb0d9aedcbda268764cf7c41b07e24b3a05356f0 (patch)
tree729b8cb4db37a1ec3511d06e0d3a762c7e48935a /libavcodec/tta.c
parentb9831364de5165d8d15329231b67e02d8c29d025 (diff)
avcodec/tta: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tta.c')
-rw-r--r--libavcodec/tta.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 19cdd8c7b2..87bfe7b811 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -104,12 +104,12 @@ static int allocate_buffers(AVCodecContext *avctx)
TTAContext *s = avctx->priv_data;
if (s->bps < 3) {
- s->decode_buffer = av_mallocz(sizeof(int32_t)*s->frame_length*s->channels);
+ s->decode_buffer = av_mallocz_array(sizeof(int32_t)*s->frame_length, s->channels);
if (!s->decode_buffer)
return AVERROR(ENOMEM);
} else
s->decode_buffer = NULL;
- s->ch_ctx = av_malloc(avctx->channels * sizeof(*s->ch_ctx));
+ s->ch_ctx = av_malloc_array(avctx->channels, sizeof(*s->ch_ctx));
if (!s->ch_ctx) {
av_freep(&s->decode_buffer);
return AVERROR(ENOMEM);