diff options
author | wm4 <wm4@nowhere> | 2016-05-16 12:51:36 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-05-16 12:51:36 +0200 |
commit | 70df6aa375b231dcbc53cdf1bb94ccf20d8ae647 (patch) | |
tree | 39718de74fde4bb6683ec60e87717babf43e34d0 /video/out/opengl/video.c | |
parent | 155857dbe63f9f9e5d417e2b14a8b81e469d6c5c (diff) |
vo_opengl: free to-be-added hook on hook array overflow
Seems sensible.
Untested.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 3 |
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); } } |