summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Federau <benjamin.federau@basyskom.com>2014-02-03 12:45:20 +0100
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2014-02-03 12:46:45 +0100
commit10798183484bc2ae7496db0c1193109d1702d4b5 (patch)
tree27d0ed832af51e3c82441ad04039a15257fb2e19
parentb9b156bfc4e866b9f5055dc8ed86a7f322e0ce2a (diff)
qtquick2videosink: fix wrong uniform value set for GST_VIDEO_FORMAT_I420 in VideoMaterialShader::updateState()0.10
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
-rw-r--r--elements/gstqtvideosink/painters/videomaterial.cpp2
1 files changed, 1 insertions, 1 deletions
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<VideoMaterial *>(newMaterial);
- if (m_id_rgbTexture) {
+ if (m_id_rgbTexture > 0) {
program()->setUniformValue(m_id_rgbTexture, 0);
} else {
program()->setUniformValue(m_id_yTexture, 0);