summaryrefslogtreecommitdiffstats
path: root/libavdevice
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-08 22:48:14 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-08 22:48:14 +0200
commit77510a96986176b1be791944861e3a6e44abd3d1 (patch)
tree0efb29973242871c14e5bd3908bb621c9a09b6bd /libavdevice
parentd1f7b313ac3476e4b00f550e470f9f8429919299 (diff)
parentbc1eace1b3654c490cb2c226b3c80854244dbb9a (diff)
downloadffmpeg-streaming-77510a96986176b1be791944861e3a6e44abd3d1.zip
ffmpeg-streaming-77510a96986176b1be791944861e3a6e44abd3d1.tar.gz
Merge commit 'bc1eace1b3654c490cb2c226b3c80854244dbb9a'
* commit 'bc1eace1b3654c490cb2c226b3c80854244dbb9a': jack: Check memory allocation Conflicts: libavdevice/jack.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavdevice')
-rw-r--r--libavdevice/jack.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/jack.c b/libavdevice/jack.c
index df829ad..917534d 100644
--- a/libavdevice/jack.c
+++ b/libavdevice/jack.c
@@ -200,6 +200,10 @@ static int start_jack(AVFormatContext *context)
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_array((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;
OpenPOWER on IntegriCloud