qml: also use the dummy texture when no buffer has been set
authorMatthew Waters <matthew@centricular.com>
Tue, 11 May 2021 10:38:52 +0000 (20:38 +1000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 12 May 2021 02:55:51 +0000 (02:55 +0000)
Fixes corrupted texture output when changing OpenGL display/contexts.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/983>

ext/qt/gstqsgtexture.cc

index 00e2dda..5b7d8b7 100644 (file)
@@ -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_);
   }
 }