[FFmpeg-devel] [PATCH 01/10] lavd/jack_audio: use av_fifo_alloc_array

Lukasz Marek lukasz.m.luki2 at gmail.com
Sun May 11 05:41:57 CEST 2014


Signed-off-by: Lukasz Marek <lukasz.m.luki2 at gmail.com>
---
 libavdevice/jack_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c
index 759ef9b..70aa6ff 100644
--- a/libavdevice/jack_audio.c
+++ b/libavdevice/jack_audio.c
@@ -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;
-- 
1.9.1



More information about the ffmpeg-devel mailing list