[vlc-devel] [PATCH] wl_shm: Fix double free at ResetPictures
casian at candrei.ro
casian at candrei.ro
Wed Apr 25 19:15:43 CEST 2018
Do not call buffer_release_cb from PictureDetach, since it will cause
picture_Release to be called twice for the same picture.
---
modules/video_output/wayland/shm.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/modules/video_output/wayland/shm.c
b/modules/video_output/wayland/shm.c
index 08ad5022f9..b5124a7ddc 100644
--- a/modules/video_output/wayland/shm.c
+++ b/modules/video_output/wayland/shm.c
@@ -91,12 +91,6 @@ static const struct wl_buffer_listener buffer_cbs =
static void PictureDetach(void *data, picture_t *pic)
{
struct wl_buffer *buf = (struct wl_buffer *)pic->p_sys;
-
- /* Detach the buffer if it is attached */
- pic = wl_buffer_get_user_data(buf);
- if (pic != NULL)
- buffer_release_cb(pic, buf);
-
wl_buffer_destroy(buf);
(void) data;
}
--
2.17.0
More information about the vlc-devel
mailing list