1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

avfilter/vf_idet: 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 21:44:13 +02:00
parent 7b78f9a0e6
commit 1d70e0c850

View File

@ -360,8 +360,6 @@ static av_cold void uninit(AVFilterContext *ctx)
av_frame_free(&idet->next); av_frame_free(&idet->next);
} }
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = { static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_YUV420P, AV_PIX_FMT_YUV420P,
AV_PIX_FMT_YUV422P, AV_PIX_FMT_YUV422P,
@ -395,8 +393,6 @@ static int query_formats(AVFilterContext *ctx)
AV_PIX_FMT_YUVA444P, AV_PIX_FMT_YUVA444P,
AV_PIX_FMT_NONE AV_PIX_FMT_NONE
}; };
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static av_cold int init(AVFilterContext *ctx) static av_cold int init(AVFilterContext *ctx)
{ {
@ -443,6 +439,6 @@ const AVFilter ff_vf_idet = {
.uninit = uninit, .uninit = uninit,
FILTER_INPUTS(idet_inputs), FILTER_INPUTS(idet_inputs),
FILTER_OUTPUTS(idet_outputs), FILTER_OUTPUTS(idet_outputs),
FILTER_QUERY_FUNC(query_formats), FILTER_PIXFMTS_ARRAY(pix_fmts),
.priv_class = &idet_class, .priv_class = &idet_class,
}; };