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: <https://gitlab.freedesktop.org/gstreamer/gst-rtsp-server/-/merge_requests/135>
This commit is contained in:
Sebastian Dröge 2020-06-15 18:29:13 +03:00
parent e4624197da
commit b681200673

View file

@ -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);
/* 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);
}
/* 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_PAUSED) {
set_state_ret = set_state (media, state);
if (set_state_ret == GST_STATE_CHANGE_ASYNC)