Always submit frames to Pacer if it's using a frame queue

This commit is contained in:
Cameron Gutman
2018-08-16 17:59:33 -07:00
parent 404eaa44e4
commit 345e800abd
3 changed files with 18 additions and 5 deletions
@@ -137,7 +137,7 @@ void Pacer::submitFrame(AVFrame* frame)
// Queue the frame until the V-sync callback if
// we have a V-sync source, otherwise deliver it
// immediately and hope for the best.
if (m_VsyncSource != nullptr) {
if (isUsingFrameQueue()) {
SDL_AtomicLock(&m_FrameQueueLock);
m_FrameQueue.enqueue(frame);
SDL_AtomicUnlock(&m_FrameQueueLock);
@@ -147,3 +147,8 @@ void Pacer::submitFrame(AVFrame* frame)
av_frame_free(&frame);
}
}
bool Pacer::isUsingFrameQueue()
{
return m_VsyncSource != nullptr;
}