Commit f1e72313f5 for ffmpeg
commit f1e72313f581598bbe57f8073f5ed848ad73ae82
Author: Kacper Michajłow <kasper93@gmail.com>
Date: Wed Sep 30 03:05:34 2026 +0200
avfilter/vf_setparams: declare the chroma location of the output
Constrain the output link to the chroma location the frames are tagged
with, the same way as for the color space, color range and alpha mode.
Signed-off-by: Kacper Michajłow <kasper93@gmail.com>
diff --git a/libavfilter/vf_setparams.c b/libavfilter/vf_setparams.c
index 17ffa098c2..a518857fe5 100644
--- a/libavfilter/vf_setparams.c
+++ b/libavfilter/vf_setparams.c
@@ -167,6 +167,13 @@ static int query_formats(const AVFilterContext *ctx,
return ret;
}
+ if (s->chroma_location >= 0) {
+ ret = ff_formats_ref(ff_make_formats_list_singleton(s->chroma_location),
+ &cfg_out[0]->chroma_locations);
+ if (ret < 0)
+ return ret;
+ }
+
if (s->alpha_mode >= 0) {
ret = ff_formats_ref(ff_make_formats_list_singleton(s->alpha_mode),
&cfg_out[0]->alpha_modes);