lavd/jack_audio: use av_fifo_alloc_array
authorLukasz Marek <lukasz.m.luki2@gmail.com>
Sun, 11 May 2014 03:13:31 +0000 (05:13 +0200)
committerLukasz Marek <lukasz.m.luki2@gmail.com>
Mon, 19 May 2014 22:00:44 +0000 (00:00 +0200)
Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
libavdevice/jack_audio.c

index 759ef9bcdfbaa67282477b6f1b74a808c1ebd58d..70aa6ffcc13d0e51ad1dd27f6b7a006b0e0ee4b6 100644 (file)
@@ -194,9 +194,9 @@ static int start_jack(AVFormatContext *context)
     }
 
     /* Create FIFO buffers */
-    self->filled_pkts = av_fifo_alloc(FIFO_PACKETS_NUM * sizeof(AVPacket));
+    self->filled_pkts = av_fifo_alloc_array(FIFO_PACKETS_NUM, sizeof(AVPacket));
     /* New packets FIFO with one extra packet for safety against underruns */
-    self->new_pkts    = av_fifo_alloc((FIFO_PACKETS_NUM + 1) * sizeof(AVPacket));
+    self->new_pkts    = av_fifo_alloc_array((FIFO_PACKETS_NUM + 1), sizeof(AVPacket));
     if ((test = supply_new_packets(self, context))) {
         jack_client_close(self->client);
         return test;