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:
parent
920512d358
commit
19f9a7066e
@ -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);
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user