summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--video/out/opengl/video.c3
1 files changed, 3 insertions, 0 deletions
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);
}
}