From 5a0a62ee16a151b19ff2f4cda0834d8084fe2fbe Mon Sep 17 00:00:00 2001 From: cxh Date: Tue, 9 Sep 2025 13:10:20 +0800 Subject: [PATCH] first commit --- src/rtsp_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rtsp_manager.cpp b/src/rtsp_manager.cpp index 8232c64..a749f74 100644 --- a/src/rtsp_manager.cpp +++ b/src/rtsp_manager.cpp @@ -120,8 +120,8 @@ gboolean RTSPManager::unmount_camera_in_main(gpointer data) auto it = mounted_factories.find(cam->name); if (it != mounted_factories.end()) { - if (it->second) - g_object_unref(it->second); // 直接释放 factory + if (it->second && G_IS_OBJECT(it->second)) + g_object_unref(it->second); // 安全 unref mounted_factories.erase(it); } streaming_status[cam->name] = false;