From 61c8a147b5fef7337ba4e68673d521d5479e49e5 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 7 Aug 2017 19:57:15 +0200 Subject: [PATCH] vo_opengl: call ra_free() in the correct context This also fixes a double free in vo_opengl_cb.c. --- video/out/opengl/video.c | 1 - video/out/vo_opengl.c | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 408013fe22..a33060de73 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -3499,7 +3499,6 @@ void gl_video_uninit(struct gl_video *p) // Should all have been unreffed already. assert(!p->num_dr_buffers); - ra_free(&p->ra); talloc_free(p); } diff --git a/video/out/vo_opengl.c b/video/out/vo_opengl.c index 8a1e47bd48..e70fbafa5f 100644 --- a/video/out/vo_opengl.c +++ b/video/out/vo_opengl.c @@ -388,6 +388,7 @@ static void uninit(struct vo *vo) hwdec_devices_set_loader(vo->hwdec_devs, NULL, NULL); hwdec_devices_destroy(vo->hwdec_devs); } + ra_free(&p->ra); mpgl_uninit(p->glctx); }