Skip to content
Snippets Groups Projects
Commit 5f8548bc authored by Niklas Haas's avatar Niklas Haas Committed by Jean-Baptiste Kempf
Browse files

libplacebo: opengl: fix double-release

glReleaseCurrent accidentally gets run twice in this code, including
once before creating the swapchain (where we definitely want the process
to be current!).

Fix this logic to only release the context once.
parent e8eb0069
No related branches found
No related tags found
Loading
Pipeline #310261 passed with stage
in 14 minutes and 47 seconds
......@@ -121,7 +121,6 @@ static int InitInstance(vlc_placebo_t *pl, const vout_display_cfg_t *cfg)
.proc_ctx = sys->gl,
#endif
});
vlc_gl_ReleaseCurrent (sys->gl);
if (!sys->opengl)
goto error;
......@@ -138,6 +137,7 @@ static int InitInstance(vlc_placebo_t *pl, const vout_display_cfg_t *cfg)
goto error;
vlc_gl_ReleaseCurrent(sys->gl);
current = false;
pl->gpu = sys->opengl->gpu;
pl->ops = &instance_opts;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment