We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5305fa1 commit 6610e23Copy full SHA for 6610e23
src/player/QQuickRealTimePlayer.cpp
@@ -93,13 +93,7 @@ shared_ptr<AVFrame> QQuickRealTimePlayer::getFrame(bool &got) {
93
// 缓冲区出队被渲染的帧
94
videoFrameQueue.pop();
95
}
96
- // 计算一帧的显示时间
97
- auto frameDuration = 1000 / decoder->GetFps();
98
// 缓冲,追帧机制
99
- if (videoFrameQueue.size() < 5) {
100
- double scale = videoFrameQueue.size() * frameDuration / 100.0;
101
- std::this_thread::sleep_for(std::chrono::milliseconds((int)(frameDuration / scale)));
102
- }
103
_lastFrame = frame;
104
return frame;
105
0 commit comments