1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

avfilter/vf_dnn_classify: Use formats list instead of query function

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 22:58:48 +02:00
parent 2bcbe923aa
commit 2af3b6d8f7

View File

@ -197,8 +197,6 @@ static av_cold int dnn_classify_init(AVFilterContext *context)
return 0;
}
static int dnn_classify_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,
@ -207,8 +205,6 @@ static int dnn_classify_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_classify_flush_frame(AVFilterLink *outlink, int64_t pts, int64_t *out_pts)
{
@ -323,7 +319,7 @@ const AVFilter ff_vf_dnn_classify = {
.uninit = dnn_classify_uninit,
FILTER_INPUTS(dnn_classify_inputs),
FILTER_OUTPUTS(dnn_classify_outputs),
FILTER_QUERY_FUNC(dnn_classify_query_formats),
FILTER_PIXFMTS_ARRAY(pix_fmts),
.priv_class = &dnn_classify_class,
.activate = dnn_classify_activate,
};