[FFmpeg-cvslog] lavfi/vf_hwupload_cuda: switch to query_func2()

Anton Khirnov git at videolan.org
Tue Oct 15 11:44:33 EEST 2024


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Oct  7 16:02:15 2024 +0200| [6929fc88455390285645df70df058b0675b758db] | committer: Anton Khirnov

lavfi/vf_hwupload_cuda: switch to query_func2()

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=6929fc88455390285645df70df058b0675b758db
---

 libavfilter/vf_hwupload_cuda.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_hwupload_cuda.c b/libavfilter/vf_hwupload_cuda.c
index 1d04045551..1b99b3fa60 100644
--- a/libavfilter/vf_hwupload_cuda.c
+++ b/libavfilter/vf_hwupload_cuda.c
@@ -52,7 +52,9 @@ static av_cold void cudaupload_uninit(AVFilterContext *ctx)
     av_buffer_unref(&s->hwdevice);
 }
 
-static int cudaupload_query_formats(AVFilterContext *ctx)
+static int cudaupload_query_formats(const AVFilterContext *ctx,
+                                    AVFilterFormatsConfig **cfg_in,
+                                    AVFilterFormatsConfig **cfg_out)
 {
     int ret;
 
@@ -71,13 +73,13 @@ static int cudaupload_query_formats(AVFilterContext *ctx)
     AVFilterFormats *in_fmts  = ff_make_format_list(input_pix_fmts);
     AVFilterFormats *out_fmts;
 
-    ret = ff_formats_ref(in_fmts, &ctx->inputs[0]->outcfg.formats);
+    ret = ff_formats_ref(in_fmts, &cfg_in[0]->formats);
     if (ret < 0)
         return ret;
 
     out_fmts = ff_make_format_list(output_pix_fmts);
 
-    ret = ff_formats_ref(out_fmts, &ctx->outputs[0]->incfg.formats);
+    ret = ff_formats_ref(out_fmts, &cfg_out[0]->formats);
     if (ret < 0)
         return ret;
 
@@ -196,7 +198,7 @@ const AVFilter ff_vf_hwupload_cuda = {
     FILTER_INPUTS(cudaupload_inputs),
     FILTER_OUTPUTS(cudaupload_outputs),
 
-    FILTER_QUERY_FUNC(cudaupload_query_formats),
+    FILTER_QUERY_FUNC2(cudaupload_query_formats),
 
     .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
 };



More information about the ffmpeg-cvslog mailing list