[FFmpeg-cvslog] lavfi/f_select: Cosmetics, move a function.
Carl Eugen Hoyos
git at videolan.org
Thu Jan 10 21:15:44 EET 2019
ffmpeg | branch: master | Carl Eugen Hoyos <ceffmpeg at gmail.com> | Thu Jan 10 20:14:08 2019 +0100| [02b6d1dd630633ae61f1fe0b46f974a53b802690] | committer: Carl Eugen Hoyos
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
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=02b6d1dd630633ae61f1fe0b46f974a53b802690
---
libavfilter/f_select.c | 46 +++++++++++++++++++++++-----------------------
1 file 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);
More information about the ffmpeg-cvslog
mailing list