lavd/jack_audio: use av_fifo_alloc_array

Signed-off-by: Lukasz Marek <lukasz.m.luki2@gmail.com>
This commit is contained in:
Lukasz Marek 2014-05-11 05:13:31 +02:00
parent 7336e39f3c
commit 51bad41a13

View 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;