aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-04-15 13:47:27 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-04-15 13:51:48 +0200
commit4615ff0d61d5d5e3738db4f508889258d049459a (patch)
treec247e5a80ca8f19443b49779738fde46e9bc5a53 /libavutil
parenteead2cddb773bbb26e5ee66b6438d0a2190c4710 (diff)
downloadffmpeg-4615ff0d61d5d5e3738db4f508889258d049459a.tar.gz
avutil/frame: use av_malloc(z)_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-rw-r--r--libavutil/frame.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 07cdc213f2..9617b10cc5 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -204,9 +204,9 @@ static int get_audio_buffer(AVFrame *frame, int align)
}
if (planes > AV_NUM_DATA_POINTERS) {
- frame->extended_data = av_mallocz(planes *
+ frame->extended_data = av_mallocz_array(planes,
sizeof(*frame->extended_data));
- frame->extended_buf = av_mallocz((planes - AV_NUM_DATA_POINTERS) *
+ frame->extended_buf = av_mallocz_array((planes - AV_NUM_DATA_POINTERS),
sizeof(*frame->extended_buf));
if (!frame->extended_data || !frame->extended_buf) {
av_freep(&frame->extended_data);
@@ -290,7 +290,7 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src)
}
if (src->extended_buf) {
- dst->extended_buf = av_mallocz(sizeof(*dst->extended_buf) *
+ dst->extended_buf = av_mallocz_array(sizeof(*dst->extended_buf),
src->nb_extended_buf);
if (!dst->extended_buf) {
ret = AVERROR(ENOMEM);
@@ -317,7 +317,7 @@ int av_frame_ref(AVFrame *dst, const AVFrame *src)
}
CHECK_CHANNELS_CONSISTENCY(src);
- dst->extended_data = av_malloc(sizeof(*dst->extended_data) * ch);
+ dst->extended_data = av_malloc_array(sizeof(*dst->extended_data), ch);
if (!dst->extended_data) {
ret = AVERROR(ENOMEM);
goto fail;