mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Send a null AVFrame to indicate end of stream to allow renderers to do render thread cleanup
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user