summaryrefslogtreecommitdiff
path: root/libavcodec/ffv1enc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-02-05 00:20:58 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-02-05 00:37:20 +0100
commitb77d94dc6cc60a8bc512897dc0e55dea78a5c390 (patch)
tree76ebd1fff036b14043474dc3be78eab7c7b2d058 /libavcodec/ffv1enc.c
parent0e2b0033f161e9630904221628a1575807851b92 (diff)
ffv1enc: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/ffv1enc.c')
-rw-r--r--libavcodec/ffv1enc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 78beb9a47e..a012df334f 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -896,6 +896,8 @@ slices_ok:
#define STATS_OUT_SIZE 1024 * 1024 * 6
if (avctx->flags & CODEC_FLAG_PASS1) {
avctx->stats_out = av_mallocz(STATS_OUT_SIZE);
+ if (!avctx->stats_out)
+ return AVERROR(ENOMEM);
for (i = 0; i < s->quant_table_count; i++)
for (j = 0; j < s->slice_count; j++) {
FFV1Context *sf = s->slice_context[j];