avfilter/vf_cover_rect: 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 15:27:41 +02:00
parent 29ffdd7848
commit e6d233e362

View File

@ -54,17 +54,6 @@ static const AVOption cover_rect_options[] = {
AVFILTER_DEFINE_CLASS(cover_rect); AVFILTER_DEFINE_CLASS(cover_rect);
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUVJ420P,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int config_input(AVFilterLink *inlink) static int config_input(AVFilterLink *inlink)
{ {
return 0; return 0;
@ -253,6 +242,6 @@ const AVFilter ff_vf_cover_rect = {
.uninit = uninit, .uninit = uninit,
FILTER_INPUTS(cover_rect_inputs), FILTER_INPUTS(cover_rect_inputs),
FILTER_OUTPUTS(cover_rect_outputs), FILTER_OUTPUTS(cover_rect_outputs),
FILTER_QUERY_FUNC(query_formats), FILTER_PIXFMTS(AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUVJ420P),
.priv_class = &cover_rect_class, .priv_class = &cover_rect_class,
}; };