Send a null AVFrame to indicate end of stream to allow renderers to do render thread cleanup
This commit is contained in:
parent
5ed7e03b2e
commit
51e9ab83ad
9 changed files with 48 additions and 0 deletions
|
|
@ -45,6 +45,10 @@ Pacer::~Pacer()
|
|||
m_RenderQueueNotEmpty.wakeAll();
|
||||
SDL_WaitThread(m_RenderThread, nullptr);
|
||||
}
|
||||
else {
|
||||
// Send a null AVFrame to indicate end of stream on the main thread
|
||||
m_VsyncRenderer->renderFrame(nullptr);
|
||||
}
|
||||
|
||||
// Delete any remaining unconsumed frames
|
||||
while (!m_RenderQueue.isEmpty()) {
|
||||
|
|
@ -106,6 +110,9 @@ int Pacer::renderThread(void* context)
|
|||
me->renderLastFrameAndUnlock();
|
||||
}
|
||||
|
||||
// Send a null AVFrame to indicate end of stream on the render thread
|
||||
me->m_VsyncRenderer->renderFrame(nullptr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue