gst-plugins-base: gl: wayland: cleanup on close

The proxy and queue are created in the gst_gl_window_wayland_egl_open()
function and will be recreated on open. This leaks both objects, the
wayland client documentation mentions that they should be destroyed
using the appropriate destroy functions.

Found during valgrind memory leak testing, these blocks were marked as
definitely lost.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4354>
This commit is contained in:
Rouven Czerwinski 2023-04-06 07:58:03 +02:00 committed by Rouven Czerwinski
parent 1b762ba012
commit 7ad84674ab

View file

@ -478,6 +478,9 @@ gst_gl_window_wayland_egl_close (GstGLWindow * gl_window)
g_source_unref (window_egl->wl_source);
window_egl->wl_source = NULL;
wl_proxy_wrapper_destroy (window_egl->display.display);
wl_event_queue_destroy (window_egl->window.queue);
GST_GL_WINDOW_CLASS (parent_class)->close (gl_window);
}