From 3b4673eba394603636fd034945a22698fb203e64 Mon Sep 17 00:00:00 2001 From: Matthew Waters Date: Tue, 11 May 2021 20:38:52 +1000 Subject: qml: also use the dummy texture when no buffer has been set Fixes corrupted texture output when changing OpenGL display/contexts. Part-of: --- ext/qt/gstqsgtexture.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext/qt/gstqsgtexture.cc b/ext/qt/gstqsgtexture.cc index 00e2ddad0..5b7d8b7f0 100644 --- a/ext/qt/gstqsgtexture.cc +++ b/ext/qt/gstqsgtexture.cc @@ -114,7 +114,7 @@ GstQSGTexture::bind () gboolean use_dummy_tex = TRUE; if (!this->qt_context_) - return; + goto out; if (!this->buffer_) goto out; @@ -190,6 +190,7 @@ out: g_assert (this->dummy_tex_id_ != 0); funcs->glBindTexture (GL_TEXTURE_2D, this->dummy_tex_id_); + GST_LOG ("%p binding fallback dummy Qt texture %u", this, this->dummy_tex_id_); } } -- cgit v1.2.1