qml: also use the dummy texture when no buffer has been set

Fixes corrupted texture output when changing OpenGL display/contexts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>
This commit is contained in:
Matthew Waters 2021-05-11 20:38:52 +10:00 committed by GStreamer Marge Bot
parent 13cba418f0
commit 3b4673eba3

View file

@ -114,7 +114,7 @@ GstQSGTexture::bind ()
gboolean use_dummy_tex = TRUE; gboolean use_dummy_tex = TRUE;
if (!this->qt_context_) if (!this->qt_context_)
return; goto out;
if (!this->buffer_) if (!this->buffer_)
goto out; goto out;
@ -190,6 +190,7 @@ out:
g_assert (this->dummy_tex_id_ != 0); g_assert (this->dummy_tex_id_ != 0);
funcs->glBindTexture (GL_TEXTURE_2D, this->dummy_tex_id_); funcs->glBindTexture (GL_TEXTURE_2D, this->dummy_tex_id_);
GST_LOG ("%p binding fallback dummy Qt texture %u", this, this->dummy_tex_id_);
} }
} }