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

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


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

diff --git a/libavfilter/vf_thumbnail_cuda.c b/libavfilter/vf_thumbnail_cuda.c
index a7a246c959..491542c60a 100644
--- a/libavfilter/vf_thumbnail_cuda.c
+++ b/libavfilter/vf_thumbnail_cuda.c
@@ -412,15 +412,6 @@ static int config_props(AVFilterLink *inlink)
     return 0;
 }
 
-static int query_formats(AVFilterContext *ctx)
-{
-    static const enum AVPixelFormat pix_fmts[] = {
-        AV_PIX_FMT_CUDA,
-        AV_PIX_FMT_NONE
-    };
-    return ff_set_common_formats_from_list(ctx, pix_fmts);
-}
-
 static const AVFilterPad thumbnail_cuda_inputs[] = {
     {
         .name         = "default",
@@ -446,7 +437,7 @@ const AVFilter ff_vf_thumbnail_cuda = {
     .uninit        = uninit,
     FILTER_INPUTS(thumbnail_cuda_inputs),
     FILTER_OUTPUTS(thumbnail_cuda_outputs),
-    FILTER_QUERY_FUNC(query_formats),
+    FILTER_SINGLE_PIXFMT(AV_PIX_FMT_CUDA),
     .priv_class    = &thumbnail_cuda_class,
     .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
 };
-- 
2.30.2



More information about the ffmpeg-devel mailing list