[gtk/no-gl-context] Allow gstreamer media backend to work without GL contexts
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/no-gl-context] Allow gstreamer media backend to work without GL contexts
- Date: Tue, 5 Jan 2021 02:54:18 +0000 (UTC)
commit 58c5d0f04230004dde4b8e94acdebfec04fbccae
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Tue Jan 5 10:43:48 2021 +0800
Allow gstreamer media backend to work without GL contexts
GstGL may not provide a way to connect the GdkGLContext to the underlying
platform's native display system to the GstGLDisplay that it use (such as
Windows), so check also whether we really have a GL context hooked up to
the GtkGstPaintable that we use before attempting to realize the paintable.
This allows the gstreamer media backend to continue to function without
crashing when we could not connect the GdkGLContext to the GstGLDisplay
directly.
modules/media/gtkgstpaintable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/modules/media/gtkgstpaintable.c b/modules/media/gtkgstpaintable.c
index 470a5f59e4..31ce585728 100644
--- a/modules/media/gtkgstpaintable.c
+++ b/modules/media/gtkgstpaintable.c
@@ -187,7 +187,7 @@ gtk_gst_paintable_realize (GtkGstPaintable *self,
native = gtk_native_get_for_surface (surface);
renderer = gtk_native_get_renderer (native);
- if (!GSK_IS_GL_RENDERER (renderer))
+ if (!GSK_IS_GL_RENDERER (renderer) || self->context == NULL)
{
GST_INFO ("not using GL with a %s renderer\n", G_OBJECT_TYPE_NAME (renderer));
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]