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

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


ffmpeg | branch: master | Anton Khirnov <anton at khirnov.net> | Mon Oct  7 11:01:13 2024 +0200| [01458a0c8fa3e51d16d737a57dfef231521b60d2] | committer: Anton Khirnov

lavfi/vf_hwdownload: switch to query_func2()

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

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

diff --git a/libavfilter/vf_hwdownload.c b/libavfilter/vf_hwdownload.c
index 0b70727b29..4a8a1a1d91 100644
--- a/libavfilter/vf_hwdownload.c
+++ b/libavfilter/vf_hwdownload.c
@@ -35,14 +35,16 @@ typedef struct HWDownloadContext {
     AVHWFramesContext *hwframes;
 } HWDownloadContext;
 
-static int hwdownload_query_formats(AVFilterContext *avctx)
+static int hwdownload_query_formats(const AVFilterContext *avctx,
+                                    AVFilterFormatsConfig **cfg_in,
+                                    AVFilterFormatsConfig **cfg_out)
 {
     int err;
 
     if ((err = ff_formats_ref(ff_formats_pixdesc_filter(AV_PIX_FMT_FLAG_HWACCEL, 0),
-                              &avctx->inputs[0]->outcfg.formats))  ||
+                              &cfg_in[0]->formats))  ||
         (err = ff_formats_ref(ff_formats_pixdesc_filter(0, AV_PIX_FMT_FLAG_HWACCEL),
-                              &avctx->outputs[0]->incfg.formats)))
+                              &cfg_out[0]->formats)))
         return err;
 
     return 0;
@@ -198,6 +200,6 @@ const AVFilter ff_vf_hwdownload = {
     .priv_class    = &hwdownload_class,
     FILTER_INPUTS(hwdownload_inputs),
     FILTER_OUTPUTS(hwdownload_outputs),
-    FILTER_QUERY_FUNC(hwdownload_query_formats),
+    FILTER_QUERY_FUNC2(hwdownload_query_formats),
     .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
 };



More information about the ffmpeg-cvslog mailing list