avdevice/jack_audio: use av_malloc_array()
authorMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Apr 2014 19:13:31 +0000 (21:13 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Wed, 23 Apr 2014 19:13:31 +0000 (21:13 +0200)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavdevice/jack_audio.c

index 67f7ac7..db1c474 100644 (file)
@@ -163,7 +163,7 @@ static int start_jack(AVFormatContext *context)
     sem_init(&self->packet_count, 0, 0);
 
     self->sample_rate = jack_get_sample_rate(self->client);
-    self->ports       = av_malloc(self->nports * sizeof(*self->ports));
+    self->ports       = av_malloc_array(self->nports, sizeof(*self->ports));
     self->buffer_size = jack_get_buffer_size(self->client);
 
     /* Register JACK ports */