mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-12-03 11:41:46 +00:00
Fix counting of old frames dropped during enqueue
This commit is contained in:
1 parent
ec59857a98
commit
dd795e35b6
1 file changed
+5
@@ -440,7 +440,12 @@ void Pacer::dropFrameForEnqueue(QQueue<AVFrame*>& queue)
|
|||||||
SDL_assert(queue.size() <= MAX_QUEUED_FRAMES);
|
SDL_assert(queue.size() <= MAX_QUEUED_FRAMES);
|
||||||
if (queue.size() == MAX_QUEUED_FRAMES) {
|
if (queue.size() == MAX_QUEUED_FRAMES) {
|
||||||
AVFrame* frame = queue.dequeue();
|
AVFrame* frame = queue.dequeue();
|
||||||
|
|
||||||
|
// Drop the lock while we call av_frame_free()
|
||||||
|
m_FrameQueueLock.unlock();
|
||||||
|
m_VideoStats->pacerDroppedFrames++;
|
||||||
av_frame_free(&frame);
|
av_frame_free(&frame);
|
||||||
|
m_FrameQueueLock.lock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user