[FFmpeg-cvslog] libopusenc: check return value

Vittorio Giovara git at videolan.org
Thu Nov 13 12:10:09 CET 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Tue Nov 11 13:26:54 2014 +0100| [b09cf8afc5199d359ac985ad7cea72a6a9f20e4e] | committer: Vittorio Giovara

libopusenc: check return value

CC: libav-stable at libav.org
Bug-Id: CID 739870

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b09cf8afc5199d359ac985ad7cea72a6a9f20e4e
---

 libavcodec/libopusenc.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/libavcodec/libopusenc.c b/libavcodec/libopusenc.c
index ee9655b..8447206 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);



More information about the ffmpeg-cvslog mailing list