Skip to content

Commit

Permalink
Wake pacing queue waiters when Pacer is being destroyed
Browse files Browse the repository at this point in the history
  • Loading branch information
cgutman committed Nov 12, 2022
1 parent 5970ca4 commit cae666b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/streaming/video/ffmpeg-renderers/pacer/pacer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ Pacer::~Pacer()

// Stop the V-sync thread
if (m_VsyncThread != nullptr) {
m_PacingQueueNotEmpty.wakeAll();
m_VsyncSignalled.wakeAll();
SDL_WaitThread(m_VsyncThread, nullptr);
}
Expand Down Expand Up @@ -244,6 +245,11 @@ void Pacer::handleVsync(int timeUntilNextVsyncMillis)
m_FrameQueueLock.unlock();
return;
}

if (m_Stopping) {
m_FrameQueueLock.unlock();
return;
}
}

// Place the first frame on the render queue
Expand Down

0 comments on commit cae666b

Please sign in to comment.