Skip to content

Commit

Permalink
rtsp-media: Make sure to also unblock pads when going to PLAYING whil…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
sdroege committed Jun 15, 2020
1 parent e462419 commit b681200
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gst/rtsp-server/rtsp-media.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b681200

Please sign in to comment.