[FFmpeg-cvslog] avfilter/vf_zscale: fix query_formats

Niklas Haas git at videolan.org
Fri Jan 12 15:13:48 EET 2024


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Fri Jan 12 14:12:44 2024 +0100| [bfa1b7577dd646e84acafd0c82a8c2c6fe9c2a0a] | committer: Niklas Haas

avfilter/vf_zscale: fix query_formats

Wrong field assignment as a result of copy/paste error.

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

 libavfilter/vf_zscale.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/libavfilter/vf_zscale.c b/libavfilter/vf_zscale.c
index 3b14ce4f33..1c55282842 100644
--- a/libavfilter/vf_zscale.c
+++ b/libavfilter/vf_zscale.c
@@ -225,20 +225,20 @@ static int query_formats(AVFilterContext *ctx)
     if (ret < 0)
         return ret;
 
-    if ((ret = ff_formats_ref(ff_all_color_spaces(), &ctx->inputs[0]->outcfg.formats)) < 0 ||
-        (ret = ff_formats_ref(ff_all_color_ranges(), &ctx->inputs[0]->outcfg.formats)) < 0)
+    if ((ret = ff_formats_ref(ff_all_color_spaces(), &ctx->inputs[0]->outcfg.color_spaces)) < 0 ||
+        (ret = ff_formats_ref(ff_all_color_ranges(), &ctx->inputs[0]->outcfg.color_ranges)) < 0)
         return ret;
 
     formats = s->colorspace != ZIMG_MATRIX_UNSPECIFIED && s->colorspace > 0
         ? ff_make_formats_list_singleton(s->colorspace)
         : ff_all_color_spaces();
-    if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
+    if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.color_spaces)) < 0)
         return ret;
 
     formats = s->range != -1
         ? ff_make_formats_list_singleton(convert_range_from_zimg(s->range))
         : ff_all_color_ranges();
-    if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.formats)) < 0)
+    if ((ret = ff_formats_ref(formats, &ctx->outputs[0]->incfg.color_ranges)) < 0)
         return ret;
 
     return 0;



More information about the ffmpeg-cvslog mailing list