[vlc-devel] [PATCH 1/2] wayland/shm: hold image on prepare

Alexandre Janniaux alexandre.janniaux at gmail.com
Mon Oct 29 14:45:40 CET 2018


Picture is released by the core, but we can only release it for real after
receiving a wl_buffer::release event.
---
 modules/video_output/wayland/shm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/modules/video_output/wayland/shm.c b/modules/video_output/wayland/shm.c
index 8ed45ef2f6..590cf78151 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -219,6 +219,8 @@ static void Prepare(vout_display_t *vd, picture_t *pic, subpicture_t *subpic,
     struct wl_surface *surface = sys->embed->handle.wl;
     struct wl_buffer *buf = (struct wl_buffer *)pic->p_sys;
 
+    picture_Hold(pic);
+
     wl_buffer_set_user_data(buf, pic);
     wl_surface_attach(surface, buf, 0, 0);
     wl_surface_damage(surface, 0, 0,
-- 
2.19.1



More information about the vlc-devel mailing list