[FFmpeg-devel] [PATCH 079/218] avfilter/vsrc_sierpinski: Store format in filter, remove query func

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Thu Sep 30 16:40:20 EEST 2021


Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at outlook.com>
---
 libavfilter/vsrc_sierpinski.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/libavfilter/vsrc_sierpinski.c b/libavfilter/vsrc_sierpinski.c
index a26542be42..047811c11f 100644
--- a/libavfilter/vsrc_sierpinski.c
+++ b/libavfilter/vsrc_sierpinski.c
@@ -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,
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list