1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-28 01:52:19 +00:00

vo_opengl: make uninit idempotent

This commit is contained in:
wm4 2014-12-03 22:37:39 +01:00
parent 920512d358
commit 19f9a7066e
2 changed files with 6 additions and 6 deletions

View File

@ -2197,6 +2197,9 @@ static int init_gl(struct gl_video *p)
void gl_video_uninit(struct gl_video *p)
{
if (!p)
return;
GL *gl = p->gl;
uninit_video(p);

View File

@ -392,12 +392,9 @@ static void uninit(struct vo *vo)
{
struct gl_priv *p = vo->priv;
if (p->glctx) {
if (p->renderer)
gl_video_uninit(p->renderer);
gl_hwdec_uninit(p->hwdec);
mpgl_uninit(p->glctx);
}
gl_video_uninit(p->renderer);
gl_hwdec_uninit(p->hwdec);
mpgl_uninit(p->glctx);
}
static int preinit(struct vo *vo)