CPU消耗过高导致卡顿

This commit is contained in:
sbkyy 2024-10-25 14:43:05 +08:00
parent 04a10d70b3
commit a41c6a63e4

View File

@ -282,6 +282,8 @@ void VideoStack::start() {
_dev->inputYUV((char**)_buffer->get()->data, _buffer->get()->linesize, pts); _dev->inputYUV((char**)_buffer->get()->data, _buffer->get()->linesize, pts);
pts += frameInterval; pts += frameInterval;
} else {
std::this_thread::sleep_for(std::chrono::milliseconds(1));
} }
} }
}); });