avfilter/af_channelmap: Use av_mallocz_array()
authorMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:05:51 +0000 (15:05 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Sat, 7 Jun 2014 13:05:51 +0000 (15:05 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/af_channelmap.c

index dac19b1..b3b5aca 100644 (file)
@@ -312,7 +312,7 @@ static int channelmap_filter_frame(AVFilterLink *inlink, AVFrame *buf)
     if (nch_out > nch_in) {
         if (nch_out > FF_ARRAY_ELEMS(buf->data)) {
             uint8_t **new_extended_data =
-                av_mallocz(nch_out * sizeof(*buf->extended_data));
+                av_mallocz_array(nch_out, sizeof(*buf->extended_data));
             if (!new_extended_data) {
                 av_frame_free(&buf);
                 return AVERROR(ENOMEM);