This commit is contained in:
cxh 2025-12-17 14:49:52 +08:00
parent 9017939660
commit 38385c811c

View File

@ -325,7 +325,11 @@ bool RTSPManager::is_any_streaming()
void RTSPManager::stop() void RTSPManager::stop()
{ {
if (loop) if (!loop) return;
if (server) gst_rtsp_server_set_backlog(server, 0); // optional
if (main_context)
{ {
g_main_context_invoke( g_main_context_invoke(
main_context, main_context,
@ -336,4 +340,6 @@ void RTSPManager::stop()
}, },
loop); loop);
} }
g_main_loop_quit(loop);
} }