mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 08:36:42 +00:00
Unbind the graphics context when exiting the stream
This commit is contained in:
parent
0d8f82a5f9
commit
64d9f18c39
@ -156,6 +156,7 @@ void MoonlightInstance::VidDecCleanup(void) {
|
||||
g_Instance->m_VideoDecoder->Flush(pp::BlockUntilComplete());
|
||||
delete g_Instance->m_VideoDecoder;
|
||||
|
||||
// Delete shader programs
|
||||
if (g_Instance->m_Texture2DShader.program) {
|
||||
glDeleteProgram(g_Instance->m_Texture2DShader.program);
|
||||
g_Instance->m_Texture2DShader.program = 0;
|
||||
@ -168,6 +169,11 @@ void MoonlightInstance::VidDecCleanup(void) {
|
||||
glDeleteProgram(g_Instance->m_ExternalOesShader.program);
|
||||
g_Instance->m_ExternalOesShader.program = 0;
|
||||
}
|
||||
|
||||
// Unbind graphics device by binding a default constructed object
|
||||
glSetCurrentContextPPAPI(0);
|
||||
g_Instance->m_Graphics3D = pp::Graphics3D();
|
||||
g_Instance->BindGraphics(g_Instance->m_Graphics3D);
|
||||
}
|
||||
|
||||
static void ProcessSpsNalu(unsigned char* data, int length) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user