mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
Use a separate callback to indicate EOS instead of renderFrame()
This commit is contained in:
@@ -814,16 +814,16 @@ bool EGLRenderer::specialize() {
|
||||
return err == GL_NO_ERROR;
|
||||
}
|
||||
|
||||
void EGLRenderer::cleanupRenderContext()
|
||||
{
|
||||
// Detach the context from the render thread so the destructor can attach it
|
||||
SDL_GL_MakeCurrent(m_Window, nullptr);
|
||||
}
|
||||
|
||||
void EGLRenderer::renderFrame(AVFrame* frame)
|
||||
{
|
||||
EGLImage imgs[EGL_MAX_PLANES];
|
||||
|
||||
if (frame == nullptr) {
|
||||
// End of stream - unbind the GL context
|
||||
SDL_GL_MakeCurrent(m_Window, nullptr);
|
||||
return;
|
||||
}
|
||||
|
||||
// Attach our GL context to the render thread
|
||||
// NB: It should already be current, unless the SDL render event watcher
|
||||
// performs a rendering operation (like a viewport update on resize) on
|
||||
|
||||
Reference in New Issue
Block a user