From b681200673b46246a051a45f494878513285886e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 15 Jun 2020 18:29:13 +0300 Subject: [PATCH] rtsp-media: Make sure to also unblock pads when going to PLAYING while buffering The pad probes are not needed anymore at this point and later when reaching buffering 100% only the state is changed, no unblocking happens. Part-of: --- gst/rtsp-server/rtsp-media.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/gst/rtsp-server/rtsp-media.c b/gst/rtsp-server/rtsp-media.c index 2cc30f6..c6004b9 100644 --- a/gst/rtsp-server/rtsp-media.c +++ b/gst/rtsp-server/rtsp-media.c @@ -4692,16 +4692,17 @@ media_set_pipeline_state_locked (GstRTSPMedia * media, GstState state) } else { GST_INFO ("state %s media %p", gst_element_state_get_name (state), media); set_target_state (media, state, FALSE); + + if (state == GST_STATE_PLAYING) { + /* make sure pads are not blocking anymore when going to PLAYING */ + media_streams_set_blocked (media, FALSE); + } + /* when we are buffering, don't update the state yet, this will be done * when buffering finishes */ if (priv->buffering) { GST_INFO ("Buffering busy, delay state change"); } else { - if (state == GST_STATE_PLAYING) { - /* make sure pads are not blocking anymore when going to PLAYING */ - media_streams_set_blocked (media, FALSE); - } - if (state == GST_STATE_PAUSED) { set_state_ret = set_state (media, state); if (set_state_ret == GST_STATE_CHANGE_ASYNC) -- 2.7.4