aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefano Sabatini <stefasab@gmail.com>2013-02-10 01:21:12 +0100
committerStefano Sabatini <stefasab@gmail.com>2013-02-10 14:00:19 +0100
commit0b1896543446491ed3d28aea82e3f990ec514c65 (patch)
treee7782f2607726119c70c0cf624530449fbf09c6d
parent63a99622876ff79a07862167f243a7d3823b7315 (diff)
downloadffmpeg-0b1896543446491ed3d28aea82e3f990ec514c65.tar.gz
lavfi/il: move query_formats() definition up
Respect order of call during the filter lifecycle, improve readability.
-rw-r--r--libavfilter/vf_il.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libavfilter/vf_il.c b/libavfilter/vf_il.c
index 47e19fa24d..7d39e9020b 100644
--- a/libavfilter/vf_il.c
+++ b/libavfilter/vf_il.c
@@ -95,6 +95,21 @@ static av_cold int init(AVFilterContext *ctx, const char *args)
return 0;
}
+static int query_formats(AVFilterContext *ctx)
+{
+ AVFilterFormats *formats = NULL;
+ int fmt;
+
+ for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
+ const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
+ if (!(desc->flags & PIX_FMT_PAL))
+ ff_add_format(&formats, fmt);
+ }
+
+ ff_set_common_formats(ctx, formats);
+ return 0;
+}
+
static int config_input(AVFilterLink *inlink)
{
IlContext *il = inlink->dst->priv;
@@ -184,21 +199,6 @@ static int filter_frame(AVFilterLink *inlink, AVFilterBufferRef *inpicref)
return ret;
}
-static int query_formats(AVFilterContext *ctx)
-{
- AVFilterFormats *formats = NULL;
- int fmt;
-
- for (fmt = 0; fmt < AV_PIX_FMT_NB; fmt++) {
- const AVPixFmtDescriptor *desc = av_pix_fmt_desc_get(fmt);
- if (!(desc->flags & PIX_FMT_PAL))
- ff_add_format(&formats, fmt);
- }
-
- ff_set_common_formats(ctx, formats);
- return 0;
-}
-
static const AVFilterPad inputs[] = {
{
.name = "default",