From dbc8a1397d4377895038e21f9c6b61c2dead52e8 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Tue, 16 Jul 2024 23:07:50 +0900 Subject: [PATCH] d3d12compositor: Fix transparent background mode with YUV output In case of YUV format without alpha channel, zero clear value for each channle will result in green color. Use calculated black background color with alpha=0 for transparent background mode instead. Part-of: --- subprojects/gst-plugins-bad/sys/d3d12/gstd3d12compositor.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12compositor.cpp b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12compositor.cpp index 2e31bd250b..6d9113f294 100644 --- a/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12compositor.cpp +++ b/subprojects/gst-plugins-bad/sys/d3d12/gstd3d12compositor.cpp @@ -1912,6 +1912,9 @@ gst_d3d12_compositor_calculate_background_color (GstD3D12Compositor * self, } } } + + priv->clear_color[2] = priv->clear_color[0]; + priv->clear_color[2].color[0][3] = 0.0; } static gboolean