mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 19:55:32 +00:00
client: destroy pipeline on client disconnect with no prior TEARDOWN.
The problem occurs when the client abruptly closes the connection without issuing a TEARDOWN. The TEARDOWN handler in the rtsp-client.c file of the RTSP server is where the pipeline gets torn down. Since this handler is not called, the pipeline remains and is up and running. Subsequent clients get their own pipelines and if the do not issue TEARDOWNs then those pipelines will also remain up and running. This is a resource leak.
This commit is contained in:
parent
5dc9e76125
commit
f7223cfdab
1 changed files with 6 additions and 2 deletions
|
@ -121,8 +121,12 @@ client_unlink_session (GstRTSPClient * client, GstRTSPSession * session)
|
|||
|
||||
/* unlink all media managed in this session */
|
||||
for (medias = session->medias; medias; medias = g_list_next (medias)) {
|
||||
unlink_session_streams (client, session,
|
||||
(GstRTSPSessionMedia *) medias->data);
|
||||
GstRTSPSessionMedia *media = medias->data;
|
||||
|
||||
gst_rtsp_session_media_set_state (media, GST_STATE_NULL);
|
||||
unlink_session_streams (client, session, media);
|
||||
/* unmanage the media in the session. */
|
||||
gst_rtsp_session_release_media (session, media);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue