aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vsrc_life.c
diff options
context:
space:
mode:
authorPaul B Mahol <onemda@gmail.com>2015-04-03 17:55:18 +0000
committerPaul B Mahol <onemda@gmail.com>2015-04-08 13:05:06 +0000
commita0854c084ea1541591c54aaab1f993ebaf92ffaf (patch)
tree1ebc69023a4f7eb471ce60ff4784b146a8b9973f /libavfilter/vsrc_life.c
parent21e034a47a2b407f0896114a995fd507f0f5230f (diff)
downloadffmpeg-a0854c084ea1541591c54aaab1f993ebaf92ffaf.tar.gz
avfilter: handle error in query_formats() in bunch of filters
Signed-off-by: Paul B Mahol <onemda@gmail.com>
Diffstat (limited to 'libavfilter/vsrc_life.c')
-rw-r--r--libavfilter/vsrc_life.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libavfilter/vsrc_life.c b/libavfilter/vsrc_life.c
index 9410fbeb0f..20bc56a4dd 100644
--- a/libavfilter/vsrc_life.c
+++ b/libavfilter/vsrc_life.c
@@ -423,7 +423,11 @@ static int query_formats(AVFilterContext *ctx)
pix_fmts[0] = AV_PIX_FMT_MONOBLACK;
life->draw = fill_picture_monoblack;
}
- ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
+
+ AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts);
+ if (!fmts_list)
+ return AVERROR(ENOMEM);
+ ff_set_common_formats(ctx, fmts_list);
return 0;
}