[FFmpeg-cvslog] avcodec/libaomenc: check return value of queue_frames()

James Almer git at videolan.org
Thu Aug 25 20:40:53 EEST 2022


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Thu Aug 25 14:22:35 2022 -0300| [9f323cb04c30742e77e6aa95fe158d7dc5cad369] | committer: James Almer

avcodec/libaomenc: check return value of queue_frames()

Signed-off-by: James Almer <jamrial at gmail.com>

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

 libavcodec/libaomenc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index fb9a6ff8b2..a82b933c18 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -1307,6 +1307,8 @@ static int aom_encode(AVCodecContext *avctx, AVPacket *pkt,
         return AVERROR_INVALIDDATA;
     }
     coded_size = queue_frames(avctx, pkt);
+    if (coded_size < 0)
+        return coded_size;
 
     if (!frame && avctx->flags & AV_CODEC_FLAG_PASS1) {
         size_t b64_size = AV_BASE64_SIZE(ctx->twopass_stats.sz);



More information about the ffmpeg-cvslog mailing list