Commit 2c4862e7 authored by Michael Niedermayer's avatar Michael Niedermayer

avfilter/avcodec: Use av_mallocz_array()

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 0bfb1e92
...@@ -116,7 +116,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src) ...@@ -116,7 +116,7 @@ int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src)
planes = av_sample_fmt_is_planar(src->format) ? nb_channels : 1; planes = av_sample_fmt_is_planar(src->format) ? nb_channels : 1;
if (planes > FF_ARRAY_ELEMS(dst->data)) { if (planes > FF_ARRAY_ELEMS(dst->data)) {
dst->extended_data = av_mallocz(planes * sizeof(*dst->extended_data)); dst->extended_data = av_mallocz_array(planes, sizeof(*dst->extended_data));
if (!dst->extended_data) if (!dst->extended_data)
return AVERROR(ENOMEM); return AVERROR(ENOMEM);
memcpy(dst->extended_data, src->extended_data, memcpy(dst->extended_data, src->extended_data,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment