jack: Check memory allocation

Bug-Id: CID 1265785
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
pull/133/head
Federico Tomassetti 10 years ago committed by Vittorio Giovara
parent 617814b4a7
commit 386e2755aa
  1. 2
      libavdevice/jack.c

@ -165,6 +165,8 @@ static int start_jack(AVFormatContext *context)
self->sample_rate = jack_get_sample_rate(self->client);
self->ports = av_malloc(self->nports * sizeof(*self->ports));
if (!self->ports)
return AVERROR(ENOMEM);
self->buffer_size = jack_get_buffer_size(self->client);
/* Register JACK ports */

Loading…
Cancel
Save