Skip to contentSkip to conversation

qv4l2: Fix video capture being transparent on Wayland

PATCH In review Mavroudis Chatzilazaridis 1 participant 2 messages Jun 14, 2025 – Jun 15, 2025 Media (V4L/DVB)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qv4l2: Fix video capture being transparent on Wayland

When a non-alpha capture format is used, the default value of 0.0 causes the capture to be transparent.

This issue is not apparent on X11 due to Qt not negotiating a format with alpha by default.

---
 utils/qv4l2/capture-win-gl.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
utils/qv4l2/capture-win-gl.cpp +1 -1
index 5558365d..5401e92c 100644
@@ -965,7 +965,7 @@ QString CaptureWinGLEngine::codeTransformToNonLinear()
 		       );
 }
 
-static const QString codeSuffix("   gl_FragColor = vec4(r, g, b, 0.0);"
+static const QString codeSuffix("   gl_FragColor = vec4(r, g, b, 1.0);"
 			  "}");
 
 static const QString codeSuffixWithAlpha("   gl_FragColor = vec4(r, g, b, a);"
Signature · 1 line
2.43.0
#1 lore raw
Quoted 9 lines · Mavroudis Chatzilazaridis

When a non-alpha capture format is used, the default value of 0.0 causes the capture to be transparent.

This issue is not apparent on X11 due to Qt not negotiating a format with alpha by default.

---
  utils/qv4l2/capture-win-gl.cpp | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Sorry, I forgot to add the SoB.