summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-16 12:51:36 +0200
committerwm4 <wm4@nowhere>2016-05-16 12:51:36 +0200
commit70df6aa375b231dcbc53cdf1bb94ccf20d8ae647 (patch)
tree39718de74fde4bb6683ec60e87717babf43e34d0 /video
parent155857dbe63f9f9e5d417e2b14a8b81e469d6c5c (diff)
downloadmpv-70df6aa375b231dcbc53cdf1bb94ccf20d8ae647.tar.bz2
mpv-70df6aa375b231dcbc53cdf1bb94ccf20d8ae647.tar.xz
vo_opengl: free to-be-added hook on hook array overflow
Seems sensible. Untested.
Diffstat (limited to 'video')
-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);
}
}