[FFmpeg-devel] [PATCH] fftools/ffplay: Fix output color_spaces of filter

Zhao Zhili quinkblack at foxmail.com
Tue Feb 20 07:33:03 EET 2024


From: Zhao Zhili <zhilizhao at tencent.com>

The sdl_supported_color_spaces only meant for SDL builtin renderer.
---
 fftools/ffplay.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fftools/ffplay.c b/fftools/ffplay.c
index 53e6fc0514..5b54fab492 100644
--- a/fftools/ffplay.c
+++ b/fftools/ffplay.c
@@ -1928,7 +1928,8 @@ static int configure_video_filters(AVFilterGraph *graph, VideoState *is, const c
 
     if ((ret = av_opt_set_int_list(filt_out, "pix_fmts", pix_fmts,  AV_PIX_FMT_NONE, AV_OPT_SEARCH_CHILDREN)) < 0)
         goto fail;
-    if ((ret = av_opt_set_int_list(filt_out, "color_spaces", sdl_supported_color_spaces,  AVCOL_SPC_UNSPECIFIED, AV_OPT_SEARCH_CHILDREN)) < 0)
+    if (!vk_renderer &&
+        (ret = av_opt_set_int_list(filt_out, "color_spaces", sdl_supported_color_spaces,  AVCOL_SPC_UNSPECIFIED, AV_OPT_SEARCH_CHILDREN)) < 0)
         goto fail;
 
     last_filter = filt_out;
-- 
2.34.1



More information about the ffmpeg-devel mailing list