From 38385c811cd0c1c5b0032fd015250961acfd19d6 Mon Sep 17 00:00:00 2001 From: cxh Date: Wed, 17 Dec 2025 14:49:52 +0800 Subject: [PATCH] 1 --- src/rtsp_manager.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rtsp_manager.cpp b/src/rtsp_manager.cpp index 8f24a00..9e276b3 100644 --- a/src/rtsp_manager.cpp +++ b/src/rtsp_manager.cpp @@ -325,7 +325,11 @@ bool RTSPManager::is_any_streaming() 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( main_context, @@ -336,4 +340,6 @@ void RTSPManager::stop() }, loop); } + + g_main_loop_quit(loop); }