[FFmpeg-cvslog] ffv1enc: check for malloc failure
Michael Niedermayer
git at videolan.org
Tue Feb 5 00:37:48 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Tue Feb 5 00:20:58 2013 +0100| [b77d94dc6cc60a8bc512897dc0e55dea78a5c390] | committer: Michael Niedermayer
ffv1enc: check for malloc failure
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b77d94dc6cc60a8bc512897dc0e55dea78a5c390
---
libavcodec/ffv1enc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 78beb9a..a012df3 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];
More information about the ffmpeg-cvslog
mailing list