summaryrefslogtreecommitdiff
path: root/libavcodec/libtheoraenc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/libtheoraenc.c')
-rw-r--r--libavcodec/libtheoraenc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/libtheoraenc.c b/libavcodec/libtheoraenc.c
index 9366a95e30..e6b1cbd2ed 100644
--- a/libavcodec/libtheoraenc.c
+++ b/libavcodec/libtheoraenc.c
@@ -111,6 +111,8 @@ static int get_stats(AVCodecContext *avctx, int eos)
// libtheora generates a summary header at the end
memcpy(h->stats, buf, bytes);
avctx->stats_out = av_malloc(b64_size);
+ if (!avctx->stats_out)
+ return AVERROR(ENOMEM);
av_base64_encode(avctx->stats_out, b64_size, h->stats, h->stats_offset);
}
return 0;