avfilter/buffer: Use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 12 May 2014 10:24:41 +0000 (12:24 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 12 May 2014 10:24:41 +0000 (12:24 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavfilter/buffer.c

index 885e9ca..0327952 100644 (file)
@@ -79,7 +79,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask)
 
         if (ref->extended_data && ref->extended_data != ref->data) {
             int nb_channels = av_get_channel_layout_nb_channels(ref->audio->channel_layout);
-            if (!(ret->extended_data = av_malloc(sizeof(*ret->extended_data) *
+            if (!(ret->extended_data = av_malloc_array(sizeof(*ret->extended_data),
                                                  nb_channels))) {
                 av_freep(&ret->audio);
                 av_freep(&ret);