avfilter/avcodec: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Apr 2014 19:13:53 +0000 (21:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Apr 2014 19:13:53 +0000 (21:13 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/avcodec.c

index 605e5d2..ba11a25 100644 (file)
@@ -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;
 
         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)
                 return AVERROR(ENOMEM);
             memcpy(dst->extended_data, src->extended_data,