From b09cf8afc5199d359ac985ad7cea72a6a9f20e4e Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Tue, 11 Nov 2014 13:26:54 +0100 Subject: libopusenc: check return value CC: libav-stable@libav.org Bug-Id: CID 739870 --- libavcodec/libopusenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/libopusenc.c') diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c index ee9655beef..84472068ed 100644 --- a/libavcodec/libopusenc.c +++ b/libavcodec/libopusenc.c @@ -308,7 +308,9 @@ static int libopus_encode(AVCodecContext *avctx, AVPacket *avpkt, int ret; if (frame) { - ff_af_queue_add(&opus->afq, frame); + ret = ff_af_queue_add(&opus->afq, frame); + if (ret < 0) + return ret; if (frame->nb_samples < opus->opts.packet_size) { audio = opus->samples; memcpy(audio, frame->data[0], frame->nb_samples * sample_size); -- cgit v1.2.3