1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/vf_cas: 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 23:30:07 +02:00
parent 7709c3eb0c
commit ee73c8bf63

View File

@ -201,8 +201,6 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
return ff_filter_frame(ctx->outputs[0], out);
}
static av_cold int query_formats(AVFilterContext *avctx)
{
static const enum AVPixelFormat pixel_fmts[] = {
AV_PIX_FMT_GRAY8,
AV_PIX_FMT_GRAY9, AV_PIX_FMT_GRAY10,
@ -230,9 +228,6 @@ static av_cold int query_formats(AVFilterContext *avctx)
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(avctx, pixel_fmts);
}
static av_cold int config_input(AVFilterLink *inlink)
{
AVFilterContext *avctx = inlink->dst;
@ -285,7 +280,7 @@ const AVFilter ff_vf_cas = {
.priv_class = &cas_class,
FILTER_INPUTS(cas_inputs),
FILTER_OUTPUTS(cas_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_PIXFMTS_ARRAY(pixel_fmts),
.flags = AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SLICE_THREADS,
.process_command = ff_filter_process_command,
};