2
This commit is contained in:
parent
4219e245c9
commit
4a9c373c05
@ -192,17 +192,16 @@ gboolean RTSPManager::unmount_camera_in_main(gpointer data)
|
|||||||
{
|
{
|
||||||
for (GstRTSPMedia *media : it->second)
|
for (GstRTSPMedia *media : it->second)
|
||||||
{
|
{
|
||||||
// ① 强制 EOS:VL C等客户端会自动断开
|
|
||||||
GstElement *pipeline = gst_rtsp_media_get_element(media);
|
GstElement *pipeline = gst_rtsp_media_get_element(media);
|
||||||
if (pipeline)
|
if (pipeline)
|
||||||
{
|
{
|
||||||
GstEvent *eos = gst_event_new_eos();
|
gst_element_set_state(pipeline, GST_STATE_NULL);
|
||||||
gst_element_send_event(pipeline, eos);
|
|
||||||
gst_object_unref(pipeline);
|
gst_object_unref(pipeline);
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_rtsp_media_unprepare(media);
|
gst_rtsp_media_unprepare(media);
|
||||||
}
|
}
|
||||||
|
|
||||||
it->second.clear();
|
it->second.clear();
|
||||||
media_map.erase(it);
|
media_map.erase(it);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user