libs: window: wayland: destroy all wayland buffers during finalize
authorMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 31 Jul 2020 09:07:23 +0000 (11:07 +0200)
committerMichael Olbrich <m.olbrich@pengutronix.de>
Fri, 31 Jul 2020 12:02:34 +0000 (14:02 +0200)
commit887ba40e658cf8a02ce23af6e3f359eca5cda518
treeb173f649c965d3b8a7cfe3b3aa8f1f3dfd1b4c77
parentd11ba513bb7f717c45a35dd742b02fe0b2f23383
libs: window: wayland: destroy all wayland buffers during finalize

Some buffers and the associated FrameState state may still be pending at
that point. If the wayland connection is shared, then messages for the
buffer may still arrive. However, the associated event queue is already
deleted. So the result is a crash.

With a private connection the associated memory is leaked instead.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/-/merge_requests/342>
gst-libs/gst/vaapi/gstvaapiwindow_wayland.c