summaryrefslogtreecommitdiff
path: root/libavfilter/vf_dnn_detect.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-27 22:57:58 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-10-05 18:58:28 +0200
commit2bcbe923aa7a329bafca091e212199a3b7b9296c (patch)
tree7c25ffb518c667adb42b42881410f82de608c2a2 /libavfilter/vf_dnn_detect.c
parent16b3be4989575c291338c8e34aedc99489910ac7 (diff)
avfilter/vf_dnn_detect: Use formats list instead of query function
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavfilter/vf_dnn_detect.c')
-rw-r--r--libavfilter/vf_dnn_detect.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/libavfilter/vf_dnn_detect.c b/libavfilter/vf_dnn_detect.c
index 2cfff00a4a..8c7b7ab3b1 100644
--- a/libavfilter/vf_dnn_detect.c
+++ b/libavfilter/vf_dnn_detect.c
@@ -340,8 +340,6 @@ static av_cold int dnn_detect_init(AVFilterContext *context)
return 0;
}
-static int dnn_detect_query_formats(AVFilterContext *context)
-{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_RGB24, AV_PIX_FMT_BGR24,
AV_PIX_FMT_GRAY8, AV_PIX_FMT_GRAYF32,
@@ -350,8 +348,6 @@ static int dnn_detect_query_formats(AVFilterContext *context)
AV_PIX_FMT_NV12,
AV_PIX_FMT_NONE
};
- return ff_set_common_formats_from_list(context, pix_fmts);
-}
static int dnn_detect_flush_frame(AVFilterLink *outlink, int64_t pts, int64_t *out_pts)
{
@@ -466,7 +462,7 @@ const AVFilter ff_vf_dnn_detect = {
.uninit = dnn_detect_uninit,
FILTER_INPUTS(dnn_detect_inputs),
FILTER_OUTPUTS(dnn_detect_outputs),
- FILTER_QUERY_FUNC(dnn_detect_query_formats),
+ FILTER_PIXFMTS_ARRAY(pix_fmts),
.priv_class = &dnn_detect_class,
.activate = dnn_detect_activate,
};