avfilter/vsrc_sierpinski: Store format in filter, remove query func

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt 2021-09-27 16:46:00 +02:00
parent a26efeb121
commit b36514b9d9

View File

@ -71,16 +71,6 @@ static const AVOption sierpinski_options[] = {
AVFILTER_DEFINE_CLASS(sierpinski);
static int query_formats(AVFilterContext *ctx)
{
static const enum AVPixelFormat pix_fmts[] = {
AV_PIX_FMT_0BGR32,
AV_PIX_FMT_NONE
};
return ff_set_common_formats_from_list(ctx, pix_fmts);
}
static int fill_sierpinski(SierpinskiContext *s, int x, int y)
{
int pos_x = x + s->pos_x;
@ -227,6 +217,6 @@ const AVFilter ff_vsrc_sierpinski = {
.priv_class = &sierpinski_class,
.inputs = NULL,
FILTER_OUTPUTS(sierpinski_outputs),
FILTER_QUERY_FUNC(query_formats),
FILTER_SINGLE_PIXFMT(AV_PIX_FMT_0BGR32),
.flags = AVFILTER_FLAG_SLICE_THREADS,
};