diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-01-20 16:24:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-01-20 17:00:16 +0100 |
commit | 48895a23fc0362a0e73e01af7ad5a761fd4aa86c (patch) | |
tree | 21a8a882f2bf6a6ed7105781e45cc8bde792f05e /libavdevice/alsa-audio-common.c | |
parent | be1b8b4da5e4bd8d69b1e8725c33871495e70209 (diff) | |
download | ffmpeg-48895a23fc0362a0e73e01af7ad5a761fd4aa86c.tar.gz |
avdevice/alsa-audio-common: Use *alloc_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice/alsa-audio-common.c')
-rw-r--r-- | libavdevice/alsa-audio-common.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavdevice/alsa-audio-common.c b/libavdevice/alsa-audio-common.c index b7f53137d7..bf876ed9a1 100644 --- a/libavdevice/alsa-audio-common.c +++ b/libavdevice/alsa-audio-common.c @@ -280,7 +280,7 @@ av_cold int ff_alsa_open(AVFormatContext *ctx, snd_pcm_stream_t mode, } if (s->reorder_func) { s->reorder_buf_size = buffer_size; - s->reorder_buf = av_malloc(s->reorder_buf_size * s->frame_size); + s->reorder_buf = av_malloc_array(s->reorder_buf_size, s->frame_size); if (!s->reorder_buf) goto fail1; } @@ -336,7 +336,7 @@ int ff_alsa_extend_reorder_buf(AlsaData *s, int min_size) av_assert0(size != 0); while (size < min_size) size *= 2; - r = av_realloc(s->reorder_buf, size * s->frame_size); + r = av_realloc_array(s->reorder_buf, size, s->frame_size); if (!r) return AVERROR(ENOMEM); s->reorder_buf = r; |