Skip to content

GStreamer Media backend: Pass WGL context ownership back to GdkGL (fix issue 5685)

Chun-wei Fan requested to merge fix-5685 into main


In the GStreamer media backend, we have no good way to find out whether it is able to playback the file that was passed into it as there may not be the necessary plugins that can handle the file format. When the file could not be played, the WGL context would be held by GstGL's thread, not the GTK/GDK thread, which means that GdkGLContext-related calls will crash as the underlying libepoxy function pointers for the (W)GL driver will be rendered invalid.

To remedy this, as we dispose of the GtkGstSink that we created, tell libepoxy that we are handing back the WGL context to it (i.e. GTK's thread), so that subsequent GdkGLContext calls can proceed normally.

This should fix issue #5685 (closed).

With blessings, thank you!

Merge request reports