From 17c45d4d056d0e10ecb88b424ec9e68be398da5e Mon Sep 17 00:00:00 2001
From: Vittorio Giovara <vittorio.giovara@gmail.com>
Date: Thu, 12 Mar 2015 12:34:52 +0000
Subject: [PATCH] libtheora: Check frame allocation

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

diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 75b0a168ed8..462bc942cee 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -260,6 +260,8 @@ static av_cold int encode_init(AVCodecContext* avc_context)
 
     /* Set up the output AVFrame */
     avc_context->coded_frame = av_frame_alloc();
+    if (!avc_context->coded_frame)
+        return AVERROR(ENOMEM);
 
     return 0;
 }
-- 
GitLab