diff options
author | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-01-10 20:14:08 +0100 |
---|---|---|
committer | Carl Eugen Hoyos <ceffmpeg@gmail.com> | 2019-01-10 20:14:08 +0100 |
commit | 02b6d1dd630633ae61f1fe0b46f974a53b802690 (patch) | |
tree | eda7e01be9699444893545ab72769f7f45097a73 | |
parent | e51811d21598eb914253f89e1153e16f171b3bed (diff) | |
download | ffmpeg-02b6d1dd630633ae61f1fe0b46f974a53b802690.tar.gz |
lavfi/f_select: Cosmetics, move a function.
Silences a warning when only aselect was enabled:
libavfilter/f_select.c:421:12: warning: 'query_formats' defined but not used
-rw-r--r-- | libavfilter/f_select.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/libavfilter/f_select.c b/libavfilter/f_select.c index a0d94cca53..1132375758 100644 --- a/libavfilter/f_select.c +++ b/libavfilter/f_select.c @@ -418,29 +418,6 @@ static av_cold void uninit(AVFilterContext *ctx) } } -static int query_formats(AVFilterContext *ctx) -{ - SelectContext *select = ctx->priv; - - 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 - }; - 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; -} - #if CONFIG_ASELECT_FILTER DEFINE_OPTIONS(aselect, AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM); @@ -486,6 +463,29 @@ AVFilter ff_af_aselect = { #if CONFIG_SELECT_FILTER +static int query_formats(AVFilterContext *ctx) +{ + SelectContext *select = ctx->priv; + + 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 + }; + 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; +} + DEFINE_OPTIONS(select, AV_OPT_FLAG_VIDEO_PARAM|AV_OPT_FLAG_FILTERING_PARAM); AVFILTER_DEFINE_CLASS(select); |