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/f_select.c | |
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/f_select.c')
-rw-r--r-- | libavfilter/f_select.c | 9 |
1 files changed, 8 insertions, 1 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; } |