aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/vf_drawbox.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 22:05:25 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:58:28 +0200
commit505072e80938d9310ab82f442a629508dcef4c32 (patch)
treed60165bf2c02975de130c1a32fcd96ae8dbef352 /libavfilter/vf_drawbox.c
parentab0834d51b28b1b614dc08405ca49532e0195dfa (diff)
downloadffmpeg-505072e80938d9310ab82f442a629508dcef4c32.tar.gz
avfilter/vf_drawbox: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_drawbox.c')
-rw-r--r--libavfilter/vf_drawbox.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/libavfilter/vf_drawbox.c b/libavfilter/vf_drawbox.c
index c5ced11bbe..1d05347b16 100644
--- a/libavfilter/vf_drawbox.c
+++ b/libavfilter/vf_drawbox.c
@@ -183,8 +183,6 @@ static av_cold int init(AVFilterContext *ctx)
return 0;
}
-static int query_formats(AVFilterContext *ctx)
-{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV444P, AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV411P, AV_PIX_FMT_YUV410P,
@@ -193,8 +191,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA420P, AV_PIX_FMT_YUVA422P, AV_PIX_FMT_YUVA444P,
AV_PIX_FMT_NONE
};
- return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
static int config_input(AVFilterLink *inlink)
{
@@ -405,7 +401,7 @@ const AVFilter ff_vf_drawbox = {
.init = init,
FILTER_INPUTS(drawbox_inputs),
FILTER_OUTPUTS(drawbox_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pix_fmts),
.process_command = process_command,
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
};
@@ -487,7 +483,7 @@ const AVFilter ff_vf_drawgrid = {
.init = init,
FILTER_INPUTS(drawgrid_inputs),
FILTER_OUTPUTS(drawgrid_outputs),
- FILTER_QUERY_FUNC(query_formats),
+ FILTER_PIXFMTS_ARRAY(pix_fmts),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC,
.process_command = process_command,
};