diff options
author | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-22 18:46:37 +0100 |
---|---|---|
committer | Derek Buitenhuis <derek.buitenhuis@gmail.com> | 2013-10-27 19:14:23 +0000 |
commit | 6ef30976e00a07ed7c6db54102d2ba50d24c876c (patch) | |
tree | ec4f00cf039688f9bb35f6e475dbc3327c32a76d /libavdevice/jack_audio.c | |
parent | fc7be7ddf3dea2f95d2d8bedde2fed44b4f469f2 (diff) | |
download | ffmpeg-streaming-6ef30976e00a07ed7c6db54102d2ba50d24c876c.zip ffmpeg-streaming-6ef30976e00a07ed7c6db54102d2ba50d24c876c.tar.gz |
timefilter: Handle memory allocation failure
Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavdevice/jack_audio.c')
-rw-r--r-- | libavdevice/jack_audio.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavdevice/jack_audio.c b/libavdevice/jack_audio.c index bd6a770..5ba6731 100644 --- a/libavdevice/jack_audio.c +++ b/libavdevice/jack_audio.c @@ -188,6 +188,10 @@ static int start_jack(AVFormatContext *context) /* Create time filter */ self->timefilter = ff_timefilter_new (1.0 / self->sample_rate, self->buffer_size, 1.5); + if (!self->timefilter) { + jack_client_close(self->client); + return AVERROR(ENOMEM); + } /* Create FIFO buffers */ self->filled_pkts = av_fifo_alloc(FIFO_PACKETS_NUM * sizeof(AVPacket)); |