From 70df6aa375b231dcbc53cdf1bb94ccf20d8ae647 Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 16 May 2016 12:51:36 +0200 Subject: vo_opengl: free to-be-added hook on hook array overflow Seems sensible. Untested. --- video/out/opengl/video.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'video/out/opengl/video.c') diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index f7dae25a28..f56cdcaff8 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1546,6 +1546,9 @@ static void pass_add_hook(struct gl_video *p, struct tex_hook hook) p->tex_hooks[p->tex_hook_num++] = hook; } else { MP_ERR(p, "Too many hooks! Limit is %d.\n", MAX_TEXTURE_HOOKS); + + if (hook.free) + hook.free(&hook); } } -- cgit v1.2.3