mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 00:51:37 +00:00
jack: Check memory allocation
CC: libav-stable@libav.org Bug-Id: CID 1292520
This commit is contained in:
parent
f7e9324733
commit
bc1eace1b3
@ -202,6 +202,10 @@ static int start_jack(AVFormatContext *context)
|
||||
self->filled_pkts = av_fifo_alloc(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));
|
||||
if (!self->new_pkts) {
|
||||
jack_client_close(self->client);
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
if ((test = supply_new_packets(self, context))) {
|
||||
jack_client_close(self->client);
|
||||
return test;
|
||||
|
Loading…
Reference in New Issue
Block a user