diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-03-12 15:34:52 +0300 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2015-03-12 18:29:59 +0300 |
commit | 17c45d4d056d0e10ecb88b424ec9e68be398da5e (patch) | |
tree | ac2615b17ba10ddbf6eff9d69b22f6029db3525b /libavcodec/libtheoraenc.c | |
parent | a72d93daa09ffbad2771f1450820941055eaf210 (diff) |
libtheora: Check frame allocation
Diffstat (limited to 'libavcodec/libtheoraenc.c')
-rw-r--r-- | libavcodec/libtheoraenc.c | 2 |
1 files changed, 2 insertions, 0 deletions
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; } |