This commit is contained in:
cxh 2025-11-20 09:19:41 +08:00
parent 4219e245c9
commit 4a9c373c05

View File

@ -192,17 +192,16 @@ gboolean RTSPManager::unmount_camera_in_main(gpointer data)
{
for (GstRTSPMedia *media : it->second)
{
// ① 强制 EOSVL C等客户端会自动断开
GstElement *pipeline = gst_rtsp_media_get_element(media);
if (pipeline)
{
GstEvent *eos = gst_event_new_eos();
gst_element_send_event(pipeline, eos);
gst_element_set_state(pipeline, GST_STATE_NULL);
gst_object_unref(pipeline);
}
gst_rtsp_media_unprepare(media);
}
it->second.clear();
media_map.erase(it);
}