gstreamer: Use the default display if needed

Calling gtk_media_stream_realize is not mandatory, but we can
still try to make dmabufs happen. Tested by removing the realize
call from GtkVideo and using GDK_DISABLE=gl.
This commit is contained in:
Matthias Clasen 2024-10-02 23:45:58 -04:00
parent 24f2540ba5
commit 0128aa9ead

View File

@ -137,7 +137,10 @@ gtk_gst_paintable_video_renderer_create_video_sink (GstPlayerVideoRenderer *rend
GdkGLContext *ctx;
GdkDisplay *display;
display = self->surface ? gdk_surface_get_display (self->surface) : NULL;
if (self->surface)
display = gdk_surface_get_display (self->surface);
else
display = gdk_display_get_default ();
sink = g_object_new (GTK_TYPE_GST_SINK,
"paintable", self,