diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-11 15:26:54 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-11-13 03:41:25 +0300 |
commit | b09cf8afc5199d359ac985ad7cea72a6a9f20e4e (patch) | |
tree | cc824b7ffce0d9b7962cb3f489631f3493d483ca /libavcodec/libopusenc.c | |
parent | 29234f56818135faf2f1868ab324c073abd28fbd (diff) |
libopusenc: check return value
CC: libav-stable@libav.org
Bug-Id: CID 739870
Diffstat (limited to 'libavcodec/libopusenc.c')
-rw-r--r-- | libavcodec/libopusenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |