From 10798183484bc2ae7496db0c1193109d1702d4b5 Mon Sep 17 00:00:00 2001 From: Benjamin Federau Date: Mon, 3 Feb 2014 12:45:20 +0100 Subject: qtquick2videosink: fix wrong uniform value set for GST_VIDEO_FORMAT_I420 in VideoMaterialShader::updateState() Inside the VideoMaterialShader::updateState() function the m_id_rgbTexture var is used to set the uniform value for RGB or YUV textures. If the video format is GST_VIDEO_FORMAT_I420 the m_id_rgbTexture var is -1. Because of this the uniform value for RGB textures is set. This causes the incorrect colors of the video. This patch fixes this bug. https://bugzilla.gnome.org/show_bug.cgi?id=719439 --- elements/gstqtvideosink/painters/videomaterial.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/gstqtvideosink/painters/videomaterial.cpp b/elements/gstqtvideosink/painters/videomaterial.cpp index 385891f..7711415 100644 --- a/elements/gstqtvideosink/painters/videomaterial.cpp +++ b/elements/gstqtvideosink/painters/videomaterial.cpp @@ -104,7 +104,7 @@ public: Q_UNUSED(oldMaterial); VideoMaterial *material = static_cast(newMaterial); - if (m_id_rgbTexture) { + if (m_id_rgbTexture > 0) { program()->setUniformValue(m_id_rgbTexture, 0); } else { program()->setUniformValue(m_id_yTexture, 0); -- cgit v1.2.3