This commit is contained in:
cxh 2025-11-20 09:10:39 +08:00
parent be1eaa0dd7
commit 4219e245c9

View File

@ -192,7 +192,15 @@ gboolean RTSPManager::unmount_camera_in_main(gpointer data)
{
for (GstRTSPMedia *media : it->second)
{
gst_rtsp_media_set_eos(media);
// ① 强制 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_object_unref(pipeline);
}
gst_rtsp_media_unprepare(media);
}
it->second.clear();