summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDudemanguy <random342@airmail.cc>2022-10-29 15:51:02 -0500
committerDudemanguy <random342@airmail.cc>2022-10-30 14:23:55 +0000
commit667222dffa63e9e0ab3d03d1d505f584d6a184a0 (patch)
tree5e5f38cd210b72cccbab11ba70a82495cb76dba0
parent8ba4ace1f65a177f77801fa87f938ef63fc01da2 (diff)
downloadmpv-667222dffa63e9e0ab3d03d1d505f584d6a184a0.tar.bz2
mpv-667222dffa63e9e0ab3d03d1d505f584d6a184a0.tar.xz
wayland: free dmabuf_feedback object
666cb91cf12a4f8b42087530104513b0fc4ba16d added dmabuf_feedback, but it was never actually free'd on uninit. Because this function requires wayland protocols 1.24, we have to wrap it in an #if. Also throw in some minor cosmetic changes in here.
-rw-r--r--video/out/wayland_common.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/video/out/wayland_common.c b/video/out/wayland_common.c
index a22a7f1a93..318e8e838d 100644
--- a/video/out/wayland_common.c
+++ b/video/out/wayland_common.c
@@ -2137,16 +2137,21 @@ void vo_wayland_uninit(struct vo *vo)
wl_registry_destroy(wl->registry);
if (wl->viewporter)
- wp_viewporter_destroy (wl->viewporter);
+ wp_viewporter_destroy(wl->viewporter);
if (wl->viewport)
- wp_viewport_destroy (wl->viewport);
+ wp_viewport_destroy(wl->viewport);
if (wl->video_viewport)
- wp_viewport_destroy (wl->video_viewport);
+ wp_viewport_destroy(wl->video_viewport);
if (wl->dmabuf)
- zwp_linux_dmabuf_v1_destroy (wl->dmabuf);
+ zwp_linux_dmabuf_v1_destroy(wl->dmabuf);
+
+#if HAVE_WAYLAND_PROTOCOLS_1_24
+ if (wl->dmabuf_feedback)
+ zwp_linux_dmabuf_feedback_v1_destroy(wl->dmabuf_feedback);
+#endif
if (wl->seat)
wl_seat_destroy(wl->seat);