ffmpeg | branch: master | Vittorio Giovara <vittorio.giov...@gmail.com> | Thu 
Mar 12 12:34:52 2015 +0000| [17c45d4d056d0e10ecb88b424ec9e68be398da5e] | 
committer: Vittorio Giovara

libtheora: Check frame allocation

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

 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;
 }

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to