From 17c45d4d056d0e10ecb88b424ec9e68be398da5e Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Thu, 12 Mar 2015 12:34:52 +0000 Subject: libtheora: Check frame allocation --- libavcodec/libtheoraenc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavcodec/libtheoraenc.c') diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c index 75b0a168ed..462bc942ce 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; } -- cgit v1.2.3