ffmpeg | branch: master | Anton Khirnov <an...@khirnov.net> | Fri Oct  4 
10:09:29 2024 +0200| [a81061b911b69b397c337bb3ba093c3e17e4daaf] | committer: 
Anton Khirnov

lavfi/vf_hwmap: switch to query_func2()

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

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

diff --git a/libavfilter/vf_hwmap.c b/libavfilter/vf_hwmap.c
index e999605eb1..f32a566b74 100644
--- a/libavfilter/vf_hwmap.c
+++ b/libavfilter/vf_hwmap.c
@@ -37,14 +37,16 @@ typedef struct HWMapContext {
     int            reverse;
 } HWMapContext;
 
-static int hwmap_query_formats(AVFilterContext *avctx)
+static int hwmap_query_formats(const AVFilterContext *avctx,
+                               AVFilterFormatsConfig **cfg_in,
+                               AVFilterFormatsConfig **cfg_out)
 {
     int ret;
 
     if ((ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO),
-                              &avctx->inputs[0]->outcfg.formats)) < 0 ||
+                              &cfg_in[0]->formats)) < 0 ||
         (ret = ff_formats_ref(ff_all_formats(AVMEDIA_TYPE_VIDEO),
-                              &avctx->outputs[0]->incfg.formats)) < 0)
+                              &cfg_out[0]->formats)) < 0)
         return ret;
 
     return 0;
@@ -428,7 +430,7 @@ const AVFilter ff_vf_hwmap = {
     .priv_class     = &hwmap_class,
     FILTER_INPUTS(hwmap_inputs),
     FILTER_OUTPUTS(hwmap_outputs),
-    FILTER_QUERY_FUNC(hwmap_query_formats),
+    FILTER_QUERY_FUNC2(hwmap_query_formats),
     .flags_internal = FF_FILTER_FLAG_HWFRAME_AWARE,
     .flags          = AVFILTER_FLAG_HWDEVICE,
 };

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to