[FFmpeg-cvslog] avfilter/vf_libplacebo: set colorspace properties on all inputs

Niklas Haas git at videolan.org
Thu Feb 27 20:02:39 EET 2025


ffmpeg | branch: master | Niklas Haas <git at haasn.dev> | Wed Feb 19 18:26:05 2025 +0100| [c85879c6012232e94c8be937ac90f96d0c66176d] | committer: Niklas Haas

avfilter/vf_libplacebo: set colorspace properties on all inputs

There is no reason to only do this on the first input. It doesn't actually
matter for now given that we don't constrain the color space list, but it
may matter when that changes.

Signed-off-by: Niklas Haas <git at haasn.dev>

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

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

diff --git a/libavfilter/vf_libplacebo.c b/libavfilter/vf_libplacebo.c
index b53543299d..1c494fdc09 100644
--- a/libavfilter/vf_libplacebo.c
+++ b/libavfilter/vf_libplacebo.c
@@ -1167,14 +1167,12 @@ static int libplacebo_query_format(const AVFilterContext *ctx,
                 RET(ff_add_format(&infmts, cfg_in[0]->formats->formats[n]));
         }
         RET(ff_formats_ref(infmts, &cfg_in[i]->formats));
+        RET(ff_formats_ref(ff_all_color_spaces(), &cfg_in[i]->color_spaces));
+        RET(ff_formats_ref(ff_all_color_ranges(), &cfg_in[i]->color_ranges));
     }
 
     RET(ff_formats_ref(outfmts, &cfg_out[0]->formats));
 
-    /* Set colorspace properties */
-    RET(ff_formats_ref(ff_all_color_spaces(), &cfg_in[0]->color_spaces));
-    RET(ff_formats_ref(ff_all_color_ranges(), &cfg_in[0]->color_ranges));
-
     outfmts = s->colorspace > 0 ? ff_make_formats_list_singleton(s->colorspace)
                                 : ff_all_color_spaces();
     RET(ff_formats_ref(outfmts, &cfg_out[0]->color_spaces));



More information about the ffmpeg-cvslog mailing list