mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 03:35:21 +00:00
qt/gloverlay: fix using OpenGL after destroying Qml
Qml somewhat unhelpfully seems to uncurrent our OpenGL context on its destruction. Work around that by uncurrenting and recurrenting again. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/632>
This commit is contained in:
parent
e394e6a034
commit
88775c2e18
1 changed files with 5 additions and 0 deletions
|
@ -504,6 +504,11 @@ void GstQuickRenderer::stopGL ()
|
|||
if (m_sharedRenderData)
|
||||
shared_render_data_unref (m_sharedRenderData);
|
||||
m_sharedRenderData = NULL;
|
||||
|
||||
/* XXX: reset the OpenGL context and drawable as Qt may have clobbered it.
|
||||
* Fixes any attempt to access OpenGL after shutting down qmlgloverlay. */
|
||||
gst_gl_context_activate (gl_context, FALSE);
|
||||
gst_gl_context_activate (gl_context, TRUE);
|
||||
}
|
||||
|
||||
void GstQuickRenderer::cleanup()
|
||||
|
|
Loading…
Reference in a new issue