Use a separate callback to indicate EOS instead of renderFrame()
This commit is contained in:
parent
5de0dc2713
commit
474591c6a5
12 changed files with 18 additions and 50 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue