diff options
author | Clément Bœsch <u@pkh.me> | 2015-03-15 16:20:34 +0300 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2015-03-17 01:43:12 +0300 |
commit | fd682b189264dc3a7fd913a21ff0c23bb08e3ef4 (patch) | |
tree | 8685464c0f7b2af6158f3f253824abe12efc8695 /libavfilter/vf_lut.c | |
parent | 545b0dd6aa30f392a9693b41c8f21e28c3dde0dd (diff) |
avfilter: handle error in query_formats() of a bunch of random video filters
Diffstat (limited to 'libavfilter/vf_lut.c')
-rw-r--r-- | libavfilter/vf_lut.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libavfilter/vf_lut.c b/libavfilter/vf_lut.c index 935bb08533..93b18a82cb 100644 --- a/libavfilter/vf_lut.c +++ b/libavfilter/vf_lut.c @@ -130,9 +130,10 @@ static int query_formats(AVFilterContext *ctx) const enum AVPixelFormat *pix_fmts = s->is_rgb ? rgb_pix_fmts : s->is_yuv ? yuv_pix_fmts : all_pix_fmts; - - ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); - return 0; + AVFilterFormats *fmts_list = ff_make_format_list(pix_fmts); + if (!fmts_list) + return AVERROR(ENOMEM); + return ff_set_common_formats(ctx, fmts_list); } /** |