Module: libav
Branch: master
Commit: 17c45d4d056d0e10ecb88b424ec9e68be398da5e

Author:    Vittorio Giovara <[email protected]>
Committer: Vittorio Giovara <[email protected]>
Date:      Thu Mar 12 12:34:52 2015 +0000

libtheora: Check frame allocation

---

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

diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 75b0a16..462bc94 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;
 }

_______________________________________________
libav-commits mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-commits

Reply via email to