first commit

This commit is contained in:
cxh 2025-09-08 15:20:16 +08:00
parent 9ee62f3964
commit 58f991fe2b

View File

@ -58,6 +58,11 @@ void RTSPManager::start(const std::vector<Camera> &cameras)
void RTSPManager::stop() void RTSPManager::stop()
{ {
if (loop)
{
g_main_loop_quit(loop); // 退出 GMainLoop
}
if (server) if (server)
{ {
g_object_unref(server); g_object_unref(server);
@ -68,5 +73,6 @@ void RTSPManager::stop()
g_main_loop_unref(loop); g_main_loop_unref(loop);
loop = nullptr; loop = nullptr;
} }
LOG_INFO("[RTSP] Server stopped."); LOG_INFO("[RTSP] Server stopped.");
} }