mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
rtsp-server: media: First set state to PLAYING again temporarily, then send EOS
Sending the EOS event while the pipeline is PAUSED can deadlock on the stream lock if a sink is currently blocked because of pre-rolling. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4340>
This commit is contained in:
parent
a17209220f
commit
5b178caadf
1 changed files with 3 additions and 3 deletions
|
@ -4102,12 +4102,12 @@ default_unprepare (GstRTSPMedia * media)
|
|||
gst_rtsp_media_set_status (media, GST_RTSP_MEDIA_STATUS_UNPREPARING);
|
||||
|
||||
if (priv->eos_shutdown) {
|
||||
GST_DEBUG ("sending EOS for shutdown");
|
||||
/* ref so that we don't disappear */
|
||||
gst_element_send_event (priv->pipeline, gst_event_new_eos ());
|
||||
/* we need to go to playing again for the EOS to propagate, normally in this
|
||||
* state, nothing is receiving data from us anymore so this is ok. */
|
||||
GST_DEBUG ("Temporarily go to PLAYING again for sending EOS");
|
||||
set_state (media, GST_STATE_PLAYING);
|
||||
GST_DEBUG ("sending EOS for shutdown");
|
||||
gst_element_send_event (priv->pipeline, gst_event_new_eos ());
|
||||
} else {
|
||||
finish_unprepare (media);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue