diff options
author | Clément Bœsch <u@pkh.me> | 2015-03-15 14:20:34 +0100 |
---|---|---|
committer | Clément Bœsch <u@pkh.me> | 2015-03-16 23:43:12 +0100 |
commit | fd682b189264dc3a7fd913a21ff0c23bb08e3ef4 (patch) | |
tree | 8685464c0f7b2af6158f3f253824abe12efc8695 /libavfilter | |
parent | 545b0dd6aa30f392a9693b41c8f21e28c3dde0dd (diff) | |
download | ffmpeg-fd682b189264dc3a7fd913a21ff0c23bb08e3ef4.tar.gz |
avfilter: handle error in query_formats() of a bunch of random video filters
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/f_select.c | 9 | ||||
-rw-r--r-- | libavfilter/vf_codecview.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_colorbalance.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_colormatrix.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_curves.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_dctdnoiz.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_decimate.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_delogo.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_deshake.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_drawbox.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_edgedetect.c | 15 | ||||
-rw-r--r-- | libavfilter/vf_elbg.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_eq.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_fieldmatch.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_gradfun.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_histeq.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_hqdn3d.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_hqx.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_hue.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_idet.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_lenscorrection.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_libopencv.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_lut.c | 7 | ||||
-rw-r--r-- | libavfilter/vf_lut3d.c | 6 | ||||
-rw-r--r-- | libavfilter/vf_mcdeint.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_mpdecimate.c | 8 | ||||
-rw-r--r-- | libavfilter/vf_owdenoise.c | 6 |
27 files changed, 118 insertions, 83 deletions
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index 546a940f0d..3e7cf782ed 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -416,11 +416,18 @@ static int query_formats(AVFilterContext *ctx) if (!select->do_scene_detect) { return ff_default_query_formats(ctx); } else { + int ret; static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }; - 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); + ret = ff_set_common_formats(ctx, fmts_list); + if (ret < 0) + return ret; } return 0; } diff --git a/libavfilter/vf_codecview.c b/libavfilter/vf_codecview.c index d777f97ef2..27fac3fa97 100644 --- a/libavfilter/vf_codecview.c +++ b/libavfilter/vf_codecview.c @@ -62,8 +62,10 @@ static int query_formats(AVFilterContext *ctx) // TODO: we can probably add way more pixel formats without any other // changes; anything with 8-bit luma in first plane should be working static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE}; - 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); } static int clip_line(int *sx, int *sy, int *ex, int *ey, int maxx) diff --git a/libavfilter/vf_colorbalance.c b/libavfilter/vf_colorbalance.c index c8f274772f..e37f1995ca 100644 --- a/libavfilter/vf_colorbalance.c +++ b/libavfilter/vf_colorbalance.c @@ -76,9 +76,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, AV_PIX_FMT_NONE }; - - 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); } static int config_output(AVFilterLink *outlink) diff --git a/libavfilter/vf_colormatrix.c b/libavfilter/vf_colormatrix.c index f5835cbf4b..cec0e3a96b 100644 --- a/libavfilter/vf_colormatrix.c +++ b/libavfilter/vf_colormatrix.c @@ -353,10 +353,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_UYVY422, AV_PIX_FMT_NONE }; - - 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); } static int filter_frame(AVFilterLink *link, AVFrame *in) diff --git a/libavfilter/vf_curves.c b/libavfilter/vf_curves.c index 29b469f1f5..1c51c1baf7 100644 --- a/libavfilter/vf_curves.c +++ b/libavfilter/vf_curves.c @@ -464,8 +464,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB0, AV_PIX_FMT_BGR0, AV_PIX_FMT_NONE }; - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_dctdnoiz.c b/libavfilter/vf_dctdnoiz.c index 098a119aba..37306bb582 100644 --- a/libavfilter/vf_dctdnoiz.c +++ b/libavfilter/vf_dctdnoiz.c @@ -600,8 +600,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_BGR24, AV_PIX_FMT_RGB24, AV_PIX_FMT_NONE }; - 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); } typedef struct ThreadData { diff --git a/libavfilter/vf_decimate.c b/libavfilter/vf_decimate.c index ffb9320c14..70357ea8e2 100644 --- a/libavfilter/vf_decimate.c +++ b/libavfilter/vf_decimate.c @@ -350,8 +350,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAY16, AV_PIX_FMT_NONE }; - 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); } static int config_output(AVFilterLink *outlink) diff --git a/libavfilter/vf_delogo.c b/libavfilter/vf_delogo.c index 6ccdfb21d0..50a548b83c 100644 --- a/libavfilter/vf_delogo.c +++ b/libavfilter/vf_delogo.c @@ -177,9 +177,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; - - 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); } static av_cold int init(AVFilterContext *ctx) diff --git a/libavfilter/vf_deshake.c b/libavfilter/vf_deshake.c index b5d5457c5e..cd06ee7dde 100644 --- a/libavfilter/vf_deshake.c +++ b/libavfilter/vf_deshake.c @@ -396,10 +396,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ420P, AV_PIX_FMT_YUVJ422P, AV_PIX_FMT_YUVJ444P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_NONE }; - - 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); } static int config_props(AVFilterLink *link) diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c index 799d07ead4..35a08e8f2e 100644 --- a/libavfilter/vf_drawbox.c +++ b/libavfilter/vf_drawbox.c @@ -112,9 +112,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUV440P, AV_PIX_FMT_YUVJ440P, AV_PIX_FMT_NONE }; - - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_edgedetect.c b/libavfilter/vf_edgedetect.c index 1fb66bccfc..ac88e02a11 100644 --- a/libavfilter/vf_edgedetect.c +++ b/libavfilter/vf_edgedetect.c @@ -78,17 +78,22 @@ static av_cold int init(AVFilterContext *ctx) static int query_formats(AVFilterContext *ctx) { const EdgeDetectContext *edgedetect = ctx->priv; + static const enum AVPixelFormat wires_pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; + static const enum AVPixelFormat colormix_pix_fmts[] = {AV_PIX_FMT_GBRP, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; + AVFilterFormats *fmts_list; + const enum AVPixelFormat *pix_fmts = NULL; if (edgedetect->mode == MODE_WIRES) { - static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; - ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); + pix_fmts = wires_pix_fmts; } else if (edgedetect->mode == MODE_COLORMIX) { - static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_GBRP, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE}; - ff_set_common_formats(ctx, ff_make_format_list(pix_fmts)); + pix_fmts = colormix_pix_fmts; } else { av_assert0(0); } - return 0; + fmts_list = ff_make_format_list(pix_fmts); + if (!fmts_list) + return AVERROR(ENOMEM); + return ff_set_common_formats(ctx, fmts_list); } static int config_props(AVFilterLink *inlink) diff --git a/libavfilter/vf_elbg.c b/libavfilter/vf_elbg.c index be0885d30b..3b8654f17d 100644 --- a/libavfilter/vf_elbg.c +++ b/libavfilter/vf_elbg.c @@ -80,10 +80,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }; - - 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); } #define NB_COMPONENTS 3 diff --git a/libavfilter/vf_eq.c b/libavfilter/vf_eq.c index a370032251..fe31dc0575 100644 --- a/libavfilter/vf_eq.c +++ b/libavfilter/vf_eq.c @@ -233,10 +233,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUV444P, AV_PIX_FMT_NONE }; - - ff_set_common_formats(ctx, ff_make_format_list(pixel_fmts_eq)); - - return 0; + AVFilterFormats *fmts_list = ff_make_format_list(pixel_fmts_eq); + if (!fmts_list) + return AVERROR(ENOMEM); + return ff_set_common_formats(ctx, fmts_list); } static int filter_frame(AVFilterLink *inlink, AVFrame *in) diff --git a/libavfilter/vf_fieldmatch.c b/libavfilter/vf_fieldmatch.c index 54fd16bee4..96cb1a4ad9 100644 --- a/libavfilter/vf_fieldmatch.c +++ b/libavfilter/vf_fieldmatch.c @@ -855,8 +855,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P, AV_PIX_FMT_NONE }; - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_gradfun.c b/libavfilter/vf_gradfun.c index 0da9e0b7bb..8c11bda457 100644 --- a/libavfilter/vf_gradfun.c +++ b/libavfilter/vf_gradfun.c @@ -155,10 +155,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_GBRP, AV_PIX_FMT_NONE }; - - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_histeq.c b/libavfilter/vf_histeq.c index 6fdb7be231..b0e9728cc1 100644 --- a/libavfilter/vf_histeq.c +++ b/libavfilter/vf_histeq.c @@ -99,9 +99,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24, AV_PIX_FMT_NONE }; - - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_hqdn3d.c b/libavfilter/vf_hqdn3d.c index 99d22d9ff7..f862014a7d 100644 --- a/libavfilter/vf_hqdn3d.c +++ b/libavfilter/vf_hqdn3d.c @@ -253,10 +253,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUV444P16, AV_PIX_FMT_NONE }; - - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_hqx.c b/libavfilter/vf_hqx.c index 4783381565..fa15d9c5c8 100644 --- a/libavfilter/vf_hqx.c +++ b/libavfilter/vf_hqx.c @@ -462,8 +462,10 @@ HQX_FUNC(4) static int query_formats(AVFilterContext *ctx) { static const enum AVPixelFormat pix_fmts[] = {AV_PIX_FMT_RGB32, AV_PIX_FMT_NONE}; - 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); } static int config_output(AVFilterLink *outlink) diff --git a/libavfilter/vf_hue.c b/libavfilter/vf_hue.c index 7843673365..2c1b34ee50 100644 --- a/libavfilter/vf_hue.c +++ b/libavfilter/vf_hue.c @@ -233,10 +233,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; - - 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); } static int config_props(AVFilterLink *inlink) diff --git a/libavfilter/vf_idet.c b/libavfilter/vf_idet.c index 5430aba628..eb1303a310 100644 --- a/libavfilter/vf_idet.c +++ b/libavfilter/vf_idet.c @@ -399,10 +399,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; - - 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); } static int config_output(AVFilterLink *outlink) diff --git a/libavfilter/vf_lenscorrection.c b/libavfilter/vf_lenscorrection.c index 82ddb29f5b..9db483dd36 100644 --- a/libavfilter/vf_lenscorrection.c +++ b/libavfilter/vf_lenscorrection.c @@ -107,9 +107,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRAP, AV_PIX_FMT_NONE }; - - 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); } static av_cold void uninit(AVFilterContext *ctx) diff --git a/libavfilter/vf_libopencv.c b/libavfilter/vf_libopencv.c index af80429751..ec15f98dd9 100644 --- a/libavfilter/vf_libopencv.c +++ b/libavfilter/vf_libopencv.c @@ -63,9 +63,10 @@ static int query_formats(AVFilterContext *ctx) static const enum AVPixelFormat pix_fmts[] = { AV_PIX_FMT_BGR24, AV_PIX_FMT_BGRA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE }; - - 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); } typedef struct OCVContext { 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); } /** diff --git a/libavfilter/vf_lut3d.c b/libavfilter/vf_lut3d.c index 862dddeacf..6768550cea 100644 --- a/libavfilter/vf_lut3d.c +++ b/libavfilter/vf_lut3d.c @@ -471,8 +471,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64, AV_PIX_FMT_NONE }; - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_mcdeint.c b/libavfilter/vf_mcdeint.c index 9f1b3f5786..402a6cc381 100644 --- a/libavfilter/vf_mcdeint.c +++ b/libavfilter/vf_mcdeint.c @@ -163,10 +163,10 @@ static int query_formats(AVFilterContext *ctx) static const enum PixelFormat pix_fmts[] = { AV_PIX_FMT_YUV420P, AV_PIX_FMT_NONE }; - - 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); } static int filter_frame(AVFilterLink *inlink, AVFrame *inpic) diff --git a/libavfilter/vf_mpdecimate.c b/libavfilter/vf_mpdecimate.c index 3ed96024c3..d86b5d89b3 100644 --- a/libavfilter/vf_mpdecimate.c +++ b/libavfilter/vf_mpdecimate.c @@ -158,10 +158,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; - - 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); } static int config_input(AVFilterLink *inlink) diff --git a/libavfilter/vf_owdenoise.c b/libavfilter/vf_owdenoise.c index 29322b17cc..f91bbe5db1 100644 --- a/libavfilter/vf_owdenoise.c +++ b/libavfilter/vf_owdenoise.c @@ -267,8 +267,10 @@ static int query_formats(AVFilterContext *ctx) AV_PIX_FMT_YUVA420P, AV_PIX_FMT_NONE }; - 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); } static int config_input(AVFilterLink *inlink) |